Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Bob Rossi <bob@brasko.net>
To: gdb@sources.redhat.com
Subject: Re: [MI] -file-list-exec-source-files
Date: Tue, 17 Feb 2004 20:02:00 -0000	[thread overview]
Message-ID: <20040217200205.GC5982@white> (raw)
In-Reply-To: <40326FEB.8050409@gnu.org>

On Tue, Feb 17, 2004 at 02:47:55PM -0500, Andrew Cagney wrote:
> >On Tue, Feb 17, 2004 at 02:12:38PM -0500, Daniel Jacobowitz wrote:
> >
> >>On Tue, Feb 17, 2004 at 02:10:05PM -0500, Bob Rossi wrote:
> >
> >>> I have one last question that didn't get answered, could the psymtab be
> >>> modified to contain the dirname?
> >
> >>
> >>Probably, but the dirname -> fullname conversion may be expensive - it
> >>involves a lot of stat() calls.
> >
> 
> As a first cut, don't worry about performance (or more correctly 
> scaleability).   Just correctness (especially of the symtab interface).

Ok.

> 
> >2. -file-list-exec-fetch-fullname [filename]
> >
> >   This will be a new MI command.
> >
> >   This will return a fullname given a filename.
> >   If the symtab is read in, it calls source.c:symtab_to_filename.
> >   If the symtab is not read in, it reads it in and calls the above
> >   function.
> >
> >   This function is necessary because all of the other MI commands still
> >   output just the filename and not the fullname. For example, breakpoints,
> >   stack, ...

Yes, I guess it's a bug. However, these commands have never returned the 
fullname. 

Here you are making a big change to the way GDB deals with front ends.
You are saying that GDB should only let the front end know about
fullnames, and know nothing about filenames.

I consider this desirable as a front end writer, since the fullname is
the only valid unique key to a front end.

It would be nice if I could do this in 2 phase's. 
First add this function, for backwards compatibility, and then, change
all the existing commands to return fullnames.

Although, leaving this function around, doesn't hurt anything.

> >3. -file-list-exec-source-files [force_fullnames]
> >
> >   This will implement an existing unimplemented MI command.
> >
> >   By default, this will return 
> >   1. filename for each psymtab, with no fullname
> >   2. filename/fullname for each symtab
> >
> >   If the option "force_fullnames" is passed, it will have GDB convert all
> >   of the psymtabs to symtabs, thus printing out the filename/fullname for 
> >   all symtabs. The overhead of doing this is probably high, and
> >   undesirable by default.
> >
> >   If the front end wants to be more efficient, it could show the user the
> >   "filenames" and then do the "fullname" lookup just on that file. Thus,
> >   only reading in one symtab.
> 
> This specification is too heavily dependent on GDB's current underlying 
> implementation - symtab and psymtab are internal details and do not 
> belong in this interface specification.

I was just showing how this interface is affected by GDB's
implementation of psymtab/symtab. The user will have no idea of these 2
concepts.

Anyways, if I can get the dirname into psymtab, this will no longer be an 
issue. The user will always get the filename/fullname combo.

With that said, do you like the implementation?

Thanks,
Bob Rossi


  reply	other threads:[~2004-02-17 20:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-13  1:29 Bob Rossi
2004-02-16  1:26 ` Bob Rossi
2004-02-16  1:42   ` Kip Macy
2004-02-16  3:19     ` Bob Rossi
2004-02-16  3:30 ` Daniel Jacobowitz
2004-02-16  3:45   ` Bob Rossi
2004-02-16  3:49     ` Daniel Jacobowitz
2004-02-16 15:33       ` Bob Rossi
2004-02-16 15:46         ` Daniel Jacobowitz
2004-02-16 16:08           ` Bob Rossi
2004-02-17 18:22             ` Andrew Cagney
2004-02-17 19:10               ` Bob Rossi
2004-02-17 19:12                 ` Daniel Jacobowitz
2004-02-17 19:30                   ` Bob Rossi
2004-02-17 19:33                     ` Daniel Jacobowitz
2004-02-23 13:13                       ` Bob Rossi
2004-02-23 13:55                         ` Daniel Jacobowitz
2004-02-24  4:26                           ` Bob Rossi
2004-02-27  6:23                           ` Bob Rossi
2004-02-27 15:00                             ` Daniel Jacobowitz
2004-02-17 19:47                     ` Andrew Cagney
2004-02-17 20:02                       ` Bob Rossi [this message]
2004-02-17 20:27                         ` Andrew Cagney
2004-02-17 21:08                           ` Bob Rossi
2004-02-17 21:37                             ` Daniel Jacobowitz
2004-02-17 21:58                               ` Bob Rossi
2004-02-18 14:24           ` Alain Magloire

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=20040217200205.GC5982@white \
    --to=bob@brasko.net \
    --cc=gdb@sources.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