From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA 6/6] Make psymbols and psymtabs independent of the program space
Date: Tue, 05 Jun 2018 20:34:00 -0000 [thread overview]
Message-ID: <b793e484-6bb6-469c-6fb3-7b44a6259f8a@redhat.com> (raw)
In-Reply-To: <20180503223621.22544-7-tom@tromey.com>
On 05/03/2018 03:36 PM, Tom Tromey wrote:
> This patch finally makes partial symbols and partial symtabs
> independent of the program space.
>
SHAZAM!
I've looked over this patch, and I'd say go for it (warning IANAM), but I would like to bring up one or two general questions that came to mind. [A lot of this stuff is pretty foreign to me, so please pardon my ignorance.]
> diff --git a/gdb/dbxread.c b/gdb/dbxread.c
> index da675abb68..91bc25a87d 100644
> --- a/gdb/dbxread.c
> +++ b/gdb/dbxread.c
> @@ -2296,8 +2281,8 @@ read_ofile_symtab (struct objfile *objfile, struct partial_symtab *pst)
>
> sym_offset = LDSYMOFF (pst);
> sym_size = LDSYMLEN (pst);
> - text_offset = PSYMTAB_TEXTLOW (pst);
> - text_size = PSYMTAB_TEXTHIGH (pst) - PSYMTAB_TEXTLOW (pst);
> + text_offset = PSYMTAB_TEXTLOW (objfile, pst);
> + text_size = PSYMTAB_TEXTHIGH (objfile, pst) - PSYMTAB_TEXTLOW (objfile, pst);
> section_offsets = objfile->section_offsets;
IIUC, text_offset can be computed using the RAW flavors since both macros simply add ANOFFSET (...). [Compilers are probably smart enough to optimize this, so take this with a grain of salt. Or a block of salt lick.]
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index 3cb0475b3b..f8630de47a 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -3178,8 +3178,8 @@ create_addrmap_from_index (struct dwarf2_per_objfile *dwarf2_per_objfile,
> continue;
> }
>
> - lo = gdbarch_adjust_dwarf2_addr (gdbarch, lo + baseaddr);
> - hi = gdbarch_adjust_dwarf2_addr (gdbarch, hi + baseaddr);
> + lo = gdbarch_adjust_dwarf2_addr (gdbarch, lo + baseaddr) - baseaddr;
> + hi = gdbarch_adjust_dwarf2_addr (gdbarch, hi + baseaddr) - baseaddr;
> addrmap_set_empty (mutable_map, lo, hi - 1,
> dwarf2_per_objfile->get_cu (cu_index));
> }
I have to admit... The above expressions look odd, but I am completely unfamiliar with gdbarch_adjust_dwarf2_addr. From the description of that function, it seems that this is okay, though.
Keith
next prev parent reply other threads:[~2018-06-05 20:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 22:36 [RFA 0/6] Make psymbols independent of the progspace Tom Tromey
2018-05-03 22:36 ` [RFA 4/6] Introduce accessors for psymtab high and low fields Tom Tromey
2018-06-01 20:48 ` Keith Seitz
2018-06-04 18:14 ` Tom Tromey
2018-06-05 21:03 ` Simon Marchi
2018-05-03 22:36 ` [RFA 1/6] Remove dead code in end_psymtab Tom Tromey
2018-06-01 18:55 ` Keith Seitz
2018-06-05 19:41 ` Simon Marchi
2018-05-03 22:36 ` [RFA 2/6] Change representation of psymbol to flush out accessors Tom Tromey
2018-06-01 19:19 ` Keith Seitz
2018-06-04 18:11 ` Tom Tromey
2018-06-05 19:49 ` Simon Marchi
2018-06-05 22:56 ` Tom Tromey
2018-06-05 23:31 ` Simon Marchi
2018-05-03 22:36 ` [RFA 5/6] Add validity bits for psymtab high and low fields Tom Tromey
2018-06-01 21:23 ` Keith Seitz
2018-06-05 17:25 ` Tom Tromey
2018-06-05 17:38 ` Keith Seitz
2018-05-03 22:36 ` [RFA 6/6] Make psymbols and psymtabs independent of the program space Tom Tromey
2018-06-05 20:34 ` Keith Seitz [this message]
2018-05-03 22:36 ` [RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument Tom Tromey
2018-06-01 20:06 ` Keith Seitz
2018-06-01 21:03 ` Tom Tromey
2018-06-05 20:50 ` Simon Marchi
2018-05-25 17:58 ` [RFA 0/6] Make psymbols independent of the progspace Tom Tromey
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=b793e484-6bb6-469c-6fb3-7b44a6259f8a@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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