1 Oct 2008 03:15
Re: [RFA/DWARF2] Handle nested subprograms in CU pc bound calculation
Joel Brobecker <brobecker <at> adacore.com>
2008-10-01 01:15:34 GMT
2008-10-01 01:15:34 GMT
> > Actually, now that I think of it, a slightly cleaner approach would
> > probably be to extend the language vector to add a flag set to non-zero
> > for the languages that want nested-subprogram handling. The only slight
> > issue is that the CU references the language enum, which means we need
> > to go from that enum to the language_defn to get access to the flag.
>
> I think you should stick with a language test in the DWARF reader.
OK. Would the following kind of patch be what you have in mind?
Or would you prefer that the function simply take a language,
rather than a CU. Or actually no function at all?
2008-09-30 Joel Brobecker <brobecker <at> adacore.com>
* dwarf2read.c (dwarf2_handle_nested_subprograms_p): New function.
(add_partial_subprogram): Replace check of Ada language by call
to dwarf2_handle_nested_subprograms_p.
(dwarf2_get_subprogram_pc_bounds, load_partial_dies): Likewise.
This is only just for comments, as there is still one question open:
For Ada, we store the symbols for nested subprograms in the global
context. This allows us to break on these functions even when these
functions are not defined in the current context. Do we want to do
the same with Pascal? Right now, I left this functionality out...
In Ada, we have found it to be extremely convenient to not have to
be inside the enclosing function before we can insert the breakpoint.
When there are ambiguities (say two functions have a nested subprogram
with the same name), the ambiguity can be resolved using the fully
qualified name.
(Continue reading)
).
Anyway, this forced me to have a heada..., I mean focus, and I noticed
a typo: "acess" -> "access".
RSS Feed