From: "David S. Miller" <davem@redhat.com>
To: ezannoni@redhat.com
Cc: kevinb@redhat.com, Peter.Schauer@regent.e-technik.tu-muenchen.de,
gdb@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING
Date: Wed, 24 Apr 2002 01:13:00 -0000 [thread overview]
Message-ID: <20020424.010342.116378338.davem@redhat.com> (raw)
In-Reply-To: <15557.45152.933354.110197@localhost.redhat.com>
From: Elena Zannoni <ezannoni@redhat.com>
Date: Tue, 23 Apr 2002 15:05:04 -0400
If we are willing to add a filename to each minimal symbol everytime,
then we could get rid of the uses of the second type, being this much
less risky. If this is an acceptable overhead, we can get rid of the
ifdefs in symmisc.c, symtab.h, minsyms.c (this stuff was added in 1995
by Jim Kingdon).
Ok, below is a patch implementing that. If we decide that the
overhead is acceptable, someone can review this for installation.
I've commented and worked on as much of your email as I can by
myself, the rest requires input/commentary from other people.
2002-04-24 David S. Miller <davem@redhat.com>
* symmisc.c, symtab.h, minsyms.c (whole file): Act as if
SOFUN_ADDRESS_MAYBE_MISSING was always defined, kill ifdefs.
--- ./symmisc.c.~1~ Fri Mar 22 10:57:08 2002
+++ ./symmisc.c Wed Apr 24 01:02:44 2002
@@ -321,10 +321,8 @@ dump_msymbols (struct objfile *objfile,
{
fprintf_filtered (outfile, " %s", SYMBOL_DEMANGLED_NAME (msymbol));
}
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (msymbol->filename)
fprintf_filtered (outfile, " %s", msymbol->filename);
-#endif
fputs_filtered ("\n", outfile);
}
if (objfile->minimal_symbol_count != index)
--- ./symtab.h.~1~ Wed Apr 24 00:15:32 2002
+++ ./symtab.h Wed Apr 24 01:02:50 2002
@@ -258,10 +258,8 @@ struct minimal_symbol
char *info;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
/* Which source file is this symbol in? Only relevant for mst_file_*. */
char *filename;
-#endif
/* Classification types for this symbol. These should be taken as "advisory
only", since if gdb can't easily figure out a classification it simply
--- ./minsyms.c.~1~ Wed Apr 24 00:16:29 2002
+++ ./minsyms.c Wed Apr 24 01:03:08 2002
@@ -157,14 +157,12 @@ lookup_minimal_symbol (register const ch
unsigned int hash = msymbol_hash (name);
unsigned int dem_hash = msymbol_hash_iw (name);
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile != NULL)
{
char *p = strrchr (sfile, '/');
if (p != NULL)
sfile = p + 1;
}
-#endif
for (objfile = object_files;
objfile != NULL && found_symbol == NULL;
@@ -193,17 +191,8 @@ lookup_minimal_symbol (register const ch
case mst_file_text:
case mst_file_data:
case mst_file_bss:
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile == NULL || STREQ (msymbol->filename, sfile))
found_file_symbol = msymbol;
-#else
- /* We have neither the ability nor the need to
- deal with the SFILE parameter. If we find
- more than one symbol, just return the latest
- one (the user can't expect useful behavior in
- that case). */
- found_file_symbol = msymbol;
-#endif
break;
case mst_solib_trampoline:
@@ -264,14 +253,12 @@ lookup_minimal_symbol_text (register con
struct minimal_symbol *found_symbol = NULL;
struct minimal_symbol *found_file_symbol = NULL;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile != NULL)
{
char *p = strrchr (sfile, '/');
if (p != NULL)
sfile = p + 1;
}
-#endif
for (objfile = object_files;
objfile != NULL && found_symbol == NULL;
@@ -291,17 +278,8 @@ lookup_minimal_symbol_text (register con
switch (MSYMBOL_TYPE (msymbol))
{
case mst_file_text:
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile == NULL || STREQ (msymbol->filename, sfile))
found_file_symbol = msymbol;
-#else
- /* We have neither the ability nor the need to
- deal with the SFILE parameter. If we find
- more than one symbol, just return the latest
- one (the user can't expect useful behavior in
- that case). */
- found_file_symbol = msymbol;
-#endif
break;
default:
found_symbol = msymbol;
@@ -338,14 +316,12 @@ lookup_minimal_symbol_solib_trampoline (
struct minimal_symbol *msymbol;
struct minimal_symbol *found_symbol = NULL;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
if (sfile != NULL)
{
char *p = strrchr (sfile, '/');
if (p != NULL)
sfile = p + 1;
}
-#endif
for (objfile = object_files;
objfile != NULL && found_symbol == NULL;
next prev parent reply other threads:[~2002-04-24 8:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020422.040949.16307644.davem@redhat.com>
[not found] ` <1020422152449.ZM1373@localhost.localdomain>
2002-04-23 3:10 ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING (was Re: multi-arch TODO) David S. Miller
2002-04-23 6:52 ` Eli Zaretskii
2002-04-23 7:01 ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING David S. Miller
2002-04-23 9:05 ` Eli Zaretskii
2002-04-23 9:43 ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING (was Re: multi-arch TODO) Kevin Buettner
2002-04-23 10:58 ` Michael Snyder
2002-04-23 12:10 ` Kevin Buettner
2002-04-23 23:11 ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING David S. Miller
2002-04-23 12:05 ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING (was Re: multi-arch TODO) Elena Zannoni
2002-04-23 23:13 ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING David S. Miller
2002-04-24 1:03 ` David S. Miller
2002-04-24 17:40 ` Elena Zannoni
2002-04-24 17:53 ` David S. Miller
2002-04-24 1:13 ` David S. Miller [this message]
2002-04-24 8:35 Michael Elizabeth Chastain
2002-04-24 17:48 ` Elena Zannoni
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=20020424.010342.116378338.davem@redhat.com \
--to=davem@redhat.com \
--cc=Peter.Schauer@regent.e-technik.tu-muenchen.de \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=gdb@sources.redhat.com \
--cc=kevinb@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