This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Location list support


Daniel Jacobowitz wrote:
On Fri, Feb 21, 2003 at 12:05:37PM +0100, Michal Ludvig wrote:

Hi,
attached is a patch that adds support for .debug_loc sections as generated by newer versions of GCC (eg. from rtlopt-branch).

Let me try saying this again... Michal, are you watching GDB HEAD
development?

Well, no, actually. I did this patch for gdb-5.3 since mainline for x86-64 is too broken to be usable (due to the merge between i386 and x86-64 targets). And since the patch for gdb-5.3 works pretty well I sent a straight mainline version port to the list.
It's nothing personal, Daniel :-)


Have you been following my discussions with Jim about how
DW_AT_location should be supported?  I didn't just ask you to wait for
the LOC_COMPUTED patch out of sheer pique.  If you're not using that
mechanism, then you're defeating the whole purpose it was implemented
for.

For instance, a good sized chunk of code you delete in the patch below
is no longer there.  Be careful updating, since you copied that deleted
code to new functions; it shouldn't be there either.

Basically, location lists should be represented as LOC_COMPUTED
symbols; the LOC_COMPUTED lookup mechanism should be updated to accept
a PC when computing the location.

OK, so the .debug_loc parser will likely remain the same, new_symbol() will create variables with location lists as LOC_COMPUTED types and read_var_val() & Co. should compute the actual location depending on the current PC. Did I understand you correctly? Hm, it doesn't seem to be that much simpler that what I did. But I understand, that I should use LOC_COMPUTED once it's there.


 The entire thing will be worlds
simpler than all the work you did below, and a heck of a lot less
fragile.  You just need to parse the location lists, store them in the
location baton, and select a list to evaluate in dwarf2loc.c.  If
there's no list entry for $pc, that's where you return optimized-out;
it might take another little change to accept an optimized-out result
there.  If there is a list entry you evaluate it just like presently.

Michal Ludvig -- * SuSE CR, s.r.o * mludvig at suse dot cz * (+420) 296.545.373 * http://www.suse.cz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]