Nick Roberts | 1 Jun 02:57 2006
Picon

Re: MI query questions

 > >  > > I suggest, for the moment, at least, that we make MI select "[1] all"
 > >  > > automatically in this case.
 > >  > 
 > >  > Nick,
 > >  > 
 > >  > I don't think this solves the problem though. As Daniel pointed out,
 > >  > 
 > >  > -interpreter-exec console "b A::func"
 > >  > 
 > >  > will cause the same problem, and needs to be addressed. I haven't
 > >  > thought this through well enough though.
 > > 
 > > Well, I guess it depends whether the existing behaviour breaks the front
 > > end or not i.e when the prompt ">" appears will it know that GDB wants
 > > more input or not?  If the answer is yes (I've not tried it) then things
 > > can be left as they are.  If its no, then something should be done and the
 > > solution being proposed doesn't sound like a quick fix.
 > > 
 > > "-interpreter-exec console "b A::func" could presumably be made to behave
 > > as "-break-insert A::func".  Witness pending breakpoints:
 > 
 > I wouldn't like to change the behavior of the CLI commands. This would
 > be confusing to users and I don't think they would like it at all.

I don't know how it would work to keep existing CLI behaviour.  I think
"-interpreter-exec console" only works for single isolated CLI commands and
not for ones like "source", "commands", "if", "while" etc or user-defined
ones.  Current behaviour seems to be broken, I'm just trying to suggest an
immediate temporary fix.  Will your solution be ready for 6.5?

(Continue reading)

Nathan Sidwell | 1 Jun 15:20 2006

patch for invalid hw breakpoints

I have a remote target w/o hw watchpoint support.  I set a watchpoint only to 
find that I then get an undeletable watchpoint as we try and remove it.

The bug is that when insert_bp_location fails to insert one of the watched 
addresses for a watch expression it then goes and tries to remove all the 
addresses of that watched expression, rather than just the previous fragments of 
the expression.

This patch adds a stop parameter to remove_breakpoint so that it can be told 
only to remove the initial watchpoints.  With it I now get a sane error message 
and can delete the actual watchpoint.

ok?

nathan
--

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan <at> codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

Attachment (break.patch): text/x-patch, 6141 bytes
Nick Roberts | 2 Jun 02:29 2006
Picon

MI: -file-list-exec-source-files


The command "-file-list-exec-source-files" often (always?) prints out each
file twice:

-file-list-exec-source-files
^done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]

Looking at the code I had hoped that one cane from the symbol table and the
other from the partial symbol table but in fact, when I try it, they both
come from the partial symbol table.  When the program being debugged has lots
of source files (1000's) this is very wasteful, so I would like to make this
command just print out each file once.  Before I do I'd like to ask:

Why does the partial symbol table have duplicate copies?

Is it safe to assume that duplicates will occur consecutively?

--

-- 
Nick                                           http://www.inet.net.nz/~nickrob

Jim Blandy | 2 Jun 21:37 2006

Re: MI: -file-list-exec-source-files


Nick Roberts <nickrob <at> snap.net.nz> writes:
> The command "-file-list-exec-source-files" often (always?) prints out each
> file twice:
>
> -file-list-exec-source-files
> ^done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]
>
> Looking at the code I had hoped that one cane from the symbol table and the
> other from the partial symbol table but in fact, when I try it, they both
> come from the partial symbol table.  When the program being debugged has lots
> of source files (1000's) this is very wasteful, so I would like to make this
> command just print out each file once.  Before I do I'd like to ask:
>
> Why does the partial symbol table have duplicate copies?
>
> Is it safe to assume that duplicates will occur consecutively?

I think I understand why header files get duplicated, but why .c files
would, too, I don't know.  If you can figure it out, let me know.  (So
I certainly don't know whether they will always appear consecutively.)

Bob Rossi | 2 Jun 21:38 2006
Picon
Picon

Re: MI: -file-list-exec-source-files

On Fri, Jun 02, 2006 at 12:37:23PM -0700, Jim Blandy wrote:
> 
> Nick Roberts <nickrob <at> snap.net.nz> writes:
> > The command "-file-list-exec-source-files" often (always?) prints out each
> > file twice:
> >
> > -file-list-exec-source-files
> > ^done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]
> >
> > Looking at the code I had hoped that one cane from the symbol table and the
> > other from the partial symbol table but in fact, when I try it, they both
> > come from the partial symbol table.  When the program being debugged has lots
> > of source files (1000's) this is very wasteful, so I would like to make this
> > command just print out each file once.  Before I do I'd like to ask:
> >
> > Why does the partial symbol table have duplicate copies?
> >
> > Is it safe to assume that duplicates will occur consecutively?
> 
> I think I understand why header files get duplicated, but why .c files
> would, too, I don't know.  If you can figure it out, let me know.  (So
> I certainly don't know whether they will always appear consecutively.)

I believe this has the same output as 'info sources', so you may want to
changes that as well?

Bob Rossi

Daniel Jacobowitz | 2 Jun 22:24 2006

Re: MI: -file-list-exec-source-files

On Fri, Jun 02, 2006 at 12:29:16PM +1200, Nick Roberts wrote:
> The command "-file-list-exec-source-files" often (always?) prints out each
> file twice:
> 
> -file-list-exec-source-files
> ^done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]
> 
> Looking at the code I had hoped that one cane from the symbol table and the
> other from the partial symbol table but in fact, when I try it, they both
> come from the partial symbol table.  When the program being debugged has lots
> of source files (1000's) this is very wasteful, so I would like to make this
> command just print out each file once.  Before I do I'd like to ask:
> 
> Why does the partial symbol table have duplicate copies?

I believe, last time I looked at this, that it has something to do
with getting a symbol file from the symbolic dwarf debug information
(.debug_info) and another from the main entry in the line table.

However, that was a long time ago.  You'd have to debug it.

> Is it safe to assume that duplicates will occur consecutively?

No, since we don't know why they occur ;-)  Also, the debug information
may actually have multiple entries for one file; GDB doesn't try to
rejoin them into a single file.  Some compilers do this.

--

-- 
Daniel Jacobowitz
CodeSourcery
(Continue reading)

susan | 3 Jun 01:31 2006
Picon

Re: MI: -file-list-exec-source-files

>Subject: Re: MI: -file-list-exec-source-files
>Jim Blandy <jimb <at> codesourcery.com> wrote:
>
>Nick Roberts <nickrob <at> snap.net.nz> writes:
>> The command "-file-list-exec-source-files" often (always?) prints out each
>> file twice:
>>
>> -file-list-exec-source-files
>> >done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]
>>
>> Looking at the code I had hoped that one cane from the symbol table and the
>> other from the partial symbol table but in fact, when I try it, they both
>> come from the partial symbol table.  When the program being debugged has lots
>> of source files (1000's) this is very wasteful, so I would like to make this
>> command just print out each file once.  Before I do I'd like to ask:
>>
>> Why does the partial symbol table have duplicate copies?
>>
>> Is it safe to assume that duplicates will occur consecutively?
>
>I think I understand why header files get duplicated, but why .c files
>would, too, I don't know.  If you can figure it out, let me know.  (So
>I certainly don't know whether they will always appear consecutively.)

This can happen with .c files too.  It depends on *how* they are compiled.  
Each represents a compilation unit (or something like that).  Imagine you 
have foo.c which includes foo.h that has "#ifdef SOMETHING".  In one 
instance you compile foo.c with SOMETHING defined, another without.  
Then link then together.  You will have 2 instances of foo.c, in this case.

(Continue reading)

Joel Brobecker | 3 Jun 01:52 2006

GDB 6.5 release candidate #1 is now available

Hello,

I have just finished creating the first release candidate for GDB 6.5.
It is available at the following location:

        ftp://sources.redhat.com/pub/gdb/snapshots/branch/gdb-6.4.90.tar.bz2

There is also a gzip'ed version available:

        gdb-6.4.90.tar.gz

Please give it a test, a report any problem you might find. This should
be very close to what will be the gdb-6.5 release.

On behalf of all the GDB developers, thank you!
--

-- 
Joel

Jim Blandy | 3 Jun 02:05 2006

Re: MI: -file-list-exec-source-files


<susan <at> smacchia.net> writes:
>>Subject: Re: MI: -file-list-exec-source-files
>>Jim Blandy <jimb <at> codesourcery.com> wrote:
>>
>>Nick Roberts <nickrob <at> snap.net.nz> writes:
>>> The command "-file-list-exec-source-files" often (always?) prints out each
>>> file twice:
>>>
>>> -file-list-exec-source-files
>>> >done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]
>>>
>>> Looking at the code I had hoped that one cane from the symbol table and the
>>> other from the partial symbol table but in fact, when I try it, they both
>>> come from the partial symbol table.  When the program being debugged has lots
>>> of source files (1000's) this is very wasteful, so I would like to make this
>>> command just print out each file once.  Before I do I'd like to ask:
>>>
>>> Why does the partial symbol table have duplicate copies?
>>>
>>> Is it safe to assume that duplicates will occur consecutively?
>>
>>I think I understand why header files get duplicated, but why .c files
>>would, too, I don't know.  If you can figure it out, let me know.  (So
>>I certainly don't know whether they will always appear consecutively.)
>
> This can happen with .c files too.  It depends on *how* they are compiled.  
> Each represents a compilation unit (or something like that).  Imagine you 
> have foo.c which includes foo.h that has "#ifdef SOMETHING".  In one 
> instance you compile foo.c with SOMETHING defined, another without.  
(Continue reading)

Susan Macchia | 3 Jun 02:45 2006
Picon

Re: MI: -file-list-exec-source-files


--- Jim Blandy <jimb <at> codesourcery.com> wrote:

> 
> Susan Macchia <susan <at> smacchia.net> writes:
> >>Subject: Re: MI: -file-list-exec-source-files
> >>Jim Blandy <jimb <at> codesourcery.com> wrote:
> >>
> >>Nick Roberts <nickrob <at> snap.net.nz> writes:
> >>> The command "-file-list-exec-source-files" often (always?) prints out
> each
> >>> file twice:
> >>>
> >>> -file-list-exec-source-files
> >>>
>
>done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}]
> >>>
> >>> Looking at the code I had hoped that one cane from the symbol table and
> the
> >>> other from the partial symbol table but in fact, when I try it, they both
> >>> come from the partial symbol table.  When the program being debugged has
> lots
> >>> of source files (1000's) this is very wasteful, so I would like to make
> this
> >>> command just print out each file once.  Before I do I'd like to ask:
> >>>
> >>> Why does the partial symbol table have duplicate copies?
> >>>
> >>> Is it safe to assume that duplicates will occur consecutively?
(Continue reading)


Gmane