Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* MI: Orphaned output for core file debugging
@ 2009-04-07 18:55 Marc Khouzam
  2009-04-07 19:06 ` Vladimir Prus
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Khouzam @ 2009-04-07 18:55 UTC (permalink / raw)
  To: gdb

Hi,

I'm working on supporting core-file debugging in DSF-GDB.
I noticed a little bug that does _not_ affect me, but
I thought I would bring put it out there for general
knowledge.

In HEAD and 6.8 (didn't try earlier), when using the -c option
on the command-line to specify the core file, when in MI mode,
there is a 'orphaned' frame output that is output on the first
MI command. In the session below you can see that my first
command is "-gdb-set confirm" and it has a frame as part
of its output.  I ran the same command right after and got
the proper output.

(This does not affect me because I'm going to use "-target-select core"
instead of the -c option.)

I think this output may need to be in a *stopped event.
This would be quite nice for the "-target-select core" case too,
instead of relying on the ^connected output.

Thanks

Marc


> gdb -i mi -c core.32141 a.out 
~"GNU gdb 6.8\n"
~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law.  Type \"show
copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\"...\n"
&"\nwarning: "
&"Can't read pathname for load map: Input/output error.\n"
~"Reading symbols from /usr/lib/libstdc++.so.6..."
~"done.\n"
~"Loaded symbols for /usr/lib/libstdc++.so.6\n"
~"Reading symbols from /lib/libm.so.6..."
~"done.\n"
~"Loaded symbols for /lib/libm.so.6\n"
~"Reading symbols from /lib/libgcc_s.so.1..."
~"done.\n"
~"Loaded symbols for /lib/libgcc_s.so.1\n"
~"Reading symbols from /lib/libc.so.6..."
~"done.\n"
~"Loaded symbols for /lib/libc.so.6\n"
~"Reading symbols from /lib/ld-linux.so.2..."
~"done.\n"
~"Loaded symbols for /lib/ld-linux.so.2\n"
&"Failed to read a valid object file image from memory.\n"
~"Core was generated by `/local/home/lmckhou/testing/a.out'.\n"
~"Program terminated with signal 5, Trace/breakpoint trap.\n"
~"[New process 32141]\n"
(gdb) 
-gdb-set confirm
^done,frame={level="0",addr="0x080484eb",func="main",args=[],file="b.cc"
,fullname="/local/home/lmckhou/testing/b.cc",line="17"}
(gdb) 
-gdb-set confirm
^done
(gdb) 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: MI: Orphaned output for core file debugging
  2009-04-07 18:55 MI: Orphaned output for core file debugging Marc Khouzam
@ 2009-04-07 19:06 ` Vladimir Prus
  2009-04-08 19:55   ` Marc Khouzam
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2009-04-07 19:06 UTC (permalink / raw)
  To: gdb

Marc Khouzam wrote:

> Hi,
> 
> I'm working on supporting core-file debugging in DSF-GDB.
> I noticed a little bug that does _not_ affect me, but
> I thought I would bring put it out there for general
> knowledge.
> 
> In HEAD and 6.8 (didn't try earlier), when using the -c option
> on the command-line to specify the core file, when in MI mode,
> there is a 'orphaned' frame output that is output on the first
> MI command. In the session below you can see that my first
> command is "-gdb-set confirm" and it has a frame as part
> of its output.  I ran the same command right after and got
> the proper output.
> 
> (This does not affect me because I'm going to use "-target-select core"
> instead of the -c option.)
> 
> I think this output may need to be in a *stopped event.
> This would be quite nice for the "-target-select core" case too,
> instead of relying on the ^connected output.
> 
> Thanks
> 
> Marc
> 
> 
>> gdb -i mi -c core.32141 a.out
> ~"GNU gdb 6.8\n"
> ~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
...
> ~"Program terminated with signal 5, Trace/breakpoint trap.\n"
> ~"[New process 32141]\n"
> (gdb)
> -gdb-set confirm
> ^done,frame={level="0",addr="0x080484eb",func="main",args=[],file="b.cc"
> ,fullname="/local/home/lmckhou/testing/b.cc",line="17"}
> (gdb)
> -gdb-set confirm
> ^done

Marc,
thanks for report. I don't think I can look into this immediately -- can
you put it in the issue tracker so that this has some chances of a fix
later?

Thanks,
Volodya




^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE:  Re: MI: Orphaned output for core file debugging
  2009-04-07 19:06 ` Vladimir Prus
@ 2009-04-08 19:55   ` Marc Khouzam
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Khouzam @ 2009-04-08 19:55 UTC (permalink / raw)
  To: Vladimir Prus, gdb


> -----Original Message-----
> From: gdb-owner@sourceware.org 
> [mailto:gdb-owner@sourceware.org] On Behalf Of Vladimir Prus
> Sent: Tuesday, April 07, 2009 2:56 PM
> To: gdb@sources.redhat.com
> Subject: Re: MI: Orphaned output for core file debugging
> 
> Marc,
> thanks for report. I don't think I can look into this 
> immediately -- can
> you put it in the issue tracker so that this has some chances of a fix
> later?
> 
> Thanks,
> Volodya
> 

Sure.
I opened Bug 10041
http://sourceware.org/bugzilla/show_bug.cgi?id=10041 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-07 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-07 18:55 MI: Orphaned output for core file debugging Marc Khouzam
2009-04-07 19:06 ` Vladimir Prus
2009-04-08 19:55   ` Marc Khouzam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox