From: Bryce McKinlay <mckinlay@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: Daniel Jacobowitz <drow@false.org>, gdb-patches@sources.redhat.com
Subject: Re: Patch: DWARF2 location lists vs. shared libraries
Date: Fri, 07 May 2004 23:31:00 -0000 [thread overview]
Message-ID: <409C1C42.2010908@redhat.com> (raw)
In-Reply-To: <vt23c6f2zbf.fsf@zenia.home>
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
How about this?
Regards
Bryce
Jim Blandy wrote:
>>I think the right thing to do would be to add the offset when
>>searching, rather than when saving. This will help us with relocating
>>objfiles, which I think would be good to support - that way we can
>>cache debug info for unchanged shared libraries across runs.
>>
>>
>Yes, that's the approach I'd prefer, too. I wish we could apply it to
>symbols as well, but I don't see how to pull that off.
>
>
[-- Attachment #2: gdb-loclist-2.patch --]
[-- Type: text/x-patch, Size: 1090 bytes --]
2004-05-07 Bryce McKinlay <mckinlay@redhat.com>
* dwarf2loc.c (find_location_expression): Use ANOFFSET to adjust
base_address for shared libraries.
Index: dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.14
diff -u -r1.14 dwarf2loc.c
--- dwarf2loc.c 26 Jan 2004 20:36:31 -0000 1.14
+++ dwarf2loc.c 7 May 2004 23:22:16 -0000
@@ -53,11 +53,14 @@
find_location_expression (struct dwarf2_loclist_baton *baton,
size_t *locexpr_length, CORE_ADDR pc)
{
- CORE_ADDR base_address = baton->base_address;
CORE_ADDR low, high;
char *loc_ptr, *buf_end;
unsigned int addr_size = TARGET_ADDR_BIT / TARGET_CHAR_BIT, length;
CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
+ /* Adjust base_address for relocatable objects. */
+ CORE_ADDR base_offset = ANOFFSET (baton->objfile->section_offsets,
+ SECT_OFF_TEXT (baton->objfile));
+ CORE_ADDR base_address = baton->base_address + base_offset;
loc_ptr = baton->data;
buf_end = baton->data + baton->size;
next prev parent reply other threads:[~2004-05-07 23:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-05 0:45 Bryce McKinlay
2004-05-05 4:03 ` Daniel Jacobowitz
2004-05-05 5:59 ` Jim Blandy
2004-05-07 23:31 ` Bryce McKinlay [this message]
2004-05-12 1:34 ` Daniel Jacobowitz
2004-05-12 22:03 ` Jim Blandy
2004-05-12 23:35 ` Bryce McKinlay
[not found] ` <40A3B128.5040309@redhat.com>
2004-05-13 17:37 ` Patch: [commited] " Daniel Jacobowitz
2004-05-14 1:42 ` Bryce McKinlay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=409C1C42.2010908@redhat.com \
--to=mckinlay@redhat.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox