From: Tom Tromey <tom@tromey.com>
To: Keith Seitz <keiths@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA 5/6] Add validity bits for psymtab high and low fields
Date: Tue, 05 Jun 2018 17:25:00 -0000 [thread overview]
Message-ID: <878t7t403p.fsf@tromey.com> (raw)
In-Reply-To: <9b460d82-3c69-21dd-eb9e-1c4598e8e9a8@redhat.com> (Keith Seitz's message of "Fri, 1 Jun 2018 14:22:59 -0700")
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>> * dbxread.c (end_psymtab): Use texthigh_valid and textlow_valid.
Keith> Does this line not also qualify for texthigh_valid:
Keith> if (PSYMTAB_TEXTHIGH (pst) == 0 && last_function_name
Keith> && gdbarch_sofun_address_maybe_missing (gdbarch))
Keith> ?
This is a bit obscure, and I'm not totally sure it is correct. The idea
is that this only happens in a pathological case, which we want to
detect. There is a comment there:
/* Under Solaris, the N_SO symbols always have a value of 0,
instead of the usual address of the .o file. Therefore,
we have to do some tricks to fill in texthigh and textlow.
..
Also the final patch in this series changes this line to:
if (PSYMTAB_RAW_TEXTHIGH (pst) == 0 && last_function_name
&& gdbarch_sofun_address_maybe_missing (gdbarch))
Keith> There's also this line in dbx_read_symtab that might qualify (from case N_SCOPE):
Keith> valu = nlist.n_value + last_function_start;
Keith> if (PSYMTAB_TEXTHIGH (pst) == 0 || valu > PSYMTAB_TEXTHIGH (pst))
Keith> SET_PSYMTAB_TEXTHIGH (pst, valu);
Keith> break;
This also gets changed to use the RAW_ forms.
Keith> Also in this function, can textlow_not_set be replaced by
Keith> textlow_valid? [The same with the textlow_not_set parameter to
Keith> dbx_end_psymtab?]
I think it is a good idea, but there is one spot setting textlow_not_set
without invoking SET_PSYMTAB_TEXTLOW. From the N_SO case:
prev_textlow_not_set = textlow_not_set;
/* A zero value is probably an indication for the SunPRO 3.0
compiler. dbx_end_psymtab explicitly tests for zero, so
don't relocate it. */
if (nlist.n_value == 0
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
textlow_not_set = 1;
valu = 0;
}
else
textlow_not_set = 0;
I don't know anything about stabs, so my basic idea in this area was to
make the changes as minimal as possible.
Tom
next prev parent reply other threads:[~2018-06-05 17:25 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 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 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 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 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-03 22:36 ` [RFA 6/6] Make psymbols and psymtabs independent of the program space Tom Tromey
2018-06-05 20:34 ` Keith Seitz
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 [this message]
2018-06-05 17:38 ` Keith Seitz
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=878t7t403p.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@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