Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: Roland McGrath <roland@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [obish?sym;rfa:doc] Wire up vsyscall
Date: Mon, 10 May 2004 21:39:00 -0000	[thread overview]
Message-ID: <409FF6A2.9040500@gnu.org> (raw)
In-Reply-To: <20040507013057.GB30182@nevyn.them.org>

On Thu, May 06, 2004 at 05:48:54PM -0700, Roland McGrath wrote:

> At present I know of the following problems:
> 
> 1. The code assumes ELF support in BFD
> Per recent BFD posts, I'm fixing this.

I didn't find what you're referring to in a quick scan of the archives.
Can you give me a specific URL in the mailing list archive, or an exact
subject line to search for?  I participated in the discussion about the
issue, but I don't recall a posting from you proposing changes to address it.


See the binutils list, where Andrew has been reimplementing the
underlying I/O mechanism lately.

> 3. inferior recycle VS inferior create
> Because GDB currently fudges things by recycling the inferior at each 
> run (instead of creating a new fresh inferior) symfile tries to reload 
> the vsyscall page.  Doesn't do any harm fortunatly.  Having a proper 
> inferior will fix this.


I don't see how this is different than any other shared library.  I
think we already set a flag that causes the objfile to be discarded
at re-run (OBJF_SHARED) unless this has been lost somewhere?
As roland wrote:

I'm not clear on what you mean by "reload the vsyscall page" here.  What
needs to happen on a repeated run is to repeat from scratch all the
vsyscall-page-related work that was done on the first run/attach.  
That is, all of the details can turn out different on each new exec:
whether or not AT_SYSINFO_EHDR is supplied at all; the address of the page;
the contents of the page, i.e. its symbol table and unwind info.
GDB should start from scratch with each new inferior.  While I've 
correctly written this new code that way, the existing symfile code and 
many chunks of GDB are not.  Instead of a nice crisp new inferior, that 
code recycles (re-loads) existing globals containing values left over 
from the previous inferior.

> +	/* FIXME: cagney/2004-05-06: Should not require an existing
> +	   BFD when trying to create a run-time BFD of the VSYSCALL
> +	   page in the inferior.  Unfortunatly that's the current
> +	   interface so for the moment bail.  Introducing a
> +	   ``bfd_runtime'' (a BFD created using the loaded image) file
> +	   format should fix this.  */
> +	return;

I think there should be an error thrown or at least a warning message here,
instead of just silent not-doing.  The user can then do "file" before
"attach" to make the backtraces work.
- you can't throw an error, that aborts the run command

> +	printf_unfiltered ("Loaded system supplied DSO at 0x%s\n",
> +			   paddr_nz (sysinfo_ehdr));

I don't know if printf_unfiltered means this or not, but this output should
only appear under `set verbose on'.  Also, I would change the message to
fix the grammar and to be consistent with other gdb messages:
	"Reading symbols from system-supplied DSO at 0x%s\n"


Either set verbose, or at least propogate from_tty here.
I'll tweak.

Andrew




  reply	other threads:[~2004-05-10 21:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-07  1:19 Andrew Cagney
2004-05-07  0:48 ` Roland McGrath
2004-05-07  1:31   ` Daniel Jacobowitz
2004-05-10 21:39     ` Andrew Cagney [this message]
2004-05-07  1:19 ` Andrew Cagney
2004-05-07  1:25   ` Daniel Jacobowitz
2004-05-10 21:27     ` Andrew Cagney
2004-05-11  5:15       ` Mark Kettenis
2004-05-11 14:49         ` Andrew Cagney
2004-05-11 14:53         ` Daniel Jacobowitz
     [not found]           ` <40A0FFB1.8030407@gnu.org>
2004-05-11 17:26             ` Daniel Jacobowitz
2004-05-12  0:28               ` Andrew Cagney
2004-05-15 20:58                 ` Mark Kettenis
2004-05-17 17:14                   ` Revamp sniffer; Was: " Andrew Cagney
2004-05-25 22:55                     ` Andrew Cagney
2004-06-11 17:32                       ` Andrew Cagney
2004-06-15 20:17                         ` Andrew Cagney
2004-06-16 23:07                           ` Roland McGrath
2004-06-24 18:10                             ` Andrew Cagney
2004-06-24 20:59                               ` Roland McGrath
2004-06-24 21:20                                 ` Mark Kettenis
2004-05-17 20:10 ` Andrew Cagney
     [not found]   ` <20040517131914.332fa347@saguaro>
2004-05-18  5:59     ` Eli Zaretskii
2004-05-18 20:09       ` Andrew Cagney
2004-05-19  5:50         ` Eli Zaretskii
2004-05-19 14:47           ` Andrew Cagney
2004-05-19 21:10             ` Eli Zaretskii
2004-05-20  5:33               ` Eli Zaretskii

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=409FF6A2.9040500@gnu.org \
    --to=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=roland@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