public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/15205] New: GDB document about option "-fullname" is inconsistent with the behavior in CLI
@ 2013-02-27  2:05 asmwarrior at gmail dot com
  2013-02-27  2:21 ` [Bug gdb/15205] " asmwarrior at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asmwarrior at gmail dot com @ 2013-02-27  2:05 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15205

             Bug #: 15205
           Summary: GDB document about option "-fullname" is inconsistent
                    with the behavior in CLI
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: asmwarrior@gmail.com
    Classification: Unclassified


Hi, in the GDB document, it said:
http://sourceware.org/gdb/current/onlinedocs/gdb/Mode-Options.html

QUOTE:
-fullname
-f
    gnu Emacs sets this option when it runs gdb as a subprocess. It tells gdb
to output the full file name and line number in a standard, recognizable
fashion each time a stack frame is displayed (which includes each time your
program stops). This recognizable format looks like two `\032' characters,
followed by the file name, line number and character position separated by
colons, and a newline. The Emacs-to-gdb interface program uses the two `\032'
characters as a signal to display the source code for the frame. 

It looks like running the "bt" command does not print the two \032 characters,
but in other cases, like the "next" command, it do have the \032s. Please see
the log message below, I'm testing under Windows.

E:\code\cb\test_code\mortenr2012-01-15\bin\Debug>gdb -fullname
mortenr2012-01-15
.exe
GNU gdb (GDB) 7.5.50.20130217-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
E:\code\cb\test_code\mortenr2012-01-15\bin\Debug\mortenr201
2-01-15.exe...done.
(gdb) b 19
Breakpoint 1 at 0x40173d: file main.cpp, line 19.
(gdb) r
Starting program:
E:\code\cb\test_code\mortenr2012-01-15\bin\Debug\mortenr2012-0
1-15.exe
[New Thread 4056.0x6fc]

Breakpoint 1, main () at main.cpp:19
\x1a\x1a[\032\032]E:\code\cb\test_code\mortenr2012-01-15\main.cpp:19:346:beg:0x40173d
(gdb) next
\x1a\x1a\x1a\x1a[\032\032]E:\code\cb\test_code\mortenr2012-01-15\main.cpp:20:359:beg:0x401742
(gdb) next
\x1a\x1a\x1a\x1a[\032\032]E:\code\cb\test_code\mortenr2012-01-15\main.cpp:21:372:beg:0x401747
(gdb) bt
#0  main () at main.cpp:21
(gdb)

Please note that the "\x1a\x1a[\032\032]" can not copied from the Command windows, so
I wrote my own as placeholder. I don't see \x1a\x1a"[\032\032]" printed in the bt
command.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/15205] GDB document about option "-fullname" is inconsistent with the behavior in CLI
  2013-02-27  2:05 [Bug gdb/15205] New: GDB document about option "-fullname" is inconsistent with the behavior in CLI asmwarrior at gmail dot com
@ 2013-02-27  2:21 ` asmwarrior at gmail dot com
  2013-02-27  9:41 ` palves at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: asmwarrior at gmail dot com @ 2013-02-27  2:21 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15205

--- Comment #1 from asmwarrior <asmwarrior at gmail dot com> 2013-02-27 02:20:58 UTC ---
Ok, I see that when pass "-fullname" to GDB, the internal value annotate = 1,
and look at the source code of GDB, I see such code snippet (when GDB runs
after bt command):

in: annotate.c.

void
annotate_frame_source_line (void)
{
  if (annotation_level == 2)
    printf_filtered (("\n\032\032frame-source-line\n"));
}

So, in the case of annotation_level==1, nothing added here.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/15205] GDB document about option "-fullname" is inconsistent with the behavior in CLI
  2013-02-27  2:05 [Bug gdb/15205] New: GDB document about option "-fullname" is inconsistent with the behavior in CLI asmwarrior at gmail dot com
  2013-02-27  2:21 ` [Bug gdb/15205] " asmwarrior at gmail dot com
@ 2013-02-27  9:41 ` palves at redhat dot com
  2013-02-27 15:08 ` asmwarrior at gmail dot com
  2013-02-27 15:40 ` palves at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: palves at redhat dot com @ 2013-02-27  9:41 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15205

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #2 from Pedro Alves <palves at redhat dot com> 2013-02-27 09:40:59 UTC ---
Does Code::Blocks use gdb with annotations rather than MI?  Or did you find
this with Emacs?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/15205] GDB document about option "-fullname" is inconsistent with the behavior in CLI
  2013-02-27  2:05 [Bug gdb/15205] New: GDB document about option "-fullname" is inconsistent with the behavior in CLI asmwarrior at gmail dot com
  2013-02-27  2:21 ` [Bug gdb/15205] " asmwarrior at gmail dot com
  2013-02-27  9:41 ` palves at redhat dot com
@ 2013-02-27 15:08 ` asmwarrior at gmail dot com
  2013-02-27 15:40 ` palves at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: asmwarrior at gmail dot com @ 2013-02-27 15:08 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15205

--- Comment #3 from asmwarrior <asmwarrior at gmail dot com> 2013-02-27 15:08:32 UTC ---
@Pedro Alves, Code::Blocks currently use the GDB CLI interface, when start
debugging, it pass the parameter "-fullname" to GDB. This will let the GDB
print the source file and line information after the "next" or "step" command.
There is on-going work to use the GDB MI interface. But as Code::Blocks use the
CLI interface for quite a long time, I think it won't switch to MI interface
immediately.

The reason I report the bug is: I think the document should state correctly.
The fact is: currently NO \032 will be print when dumping the stack in the
"-fullname" mode.

PS: I know nothing about how Emace communicate with GDB.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug gdb/15205] GDB document about option "-fullname" is inconsistent with the behavior in CLI
  2013-02-27  2:05 [Bug gdb/15205] New: GDB document about option "-fullname" is inconsistent with the behavior in CLI asmwarrior at gmail dot com
                   ` (2 preceding siblings ...)
  2013-02-27 15:08 ` asmwarrior at gmail dot com
@ 2013-02-27 15:40 ` palves at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: palves at redhat dot com @ 2013-02-27 15:40 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15205

--- Comment #4 from Pedro Alves <palves at redhat dot com> 2013-02-27 15:40:06 UTC ---
Emacs was the canonical, and last, or so we thought, user of
fullname/annotations.  Emacs 24 finally switched to MI.  Annotations support in
GDB is pretty much in limbo, and we're going to drop it completely at some
point.  Thus we urge you guys to push Code::Block in the MI direction.  For
instance, it's not possible to implement non-stop mode properly with
annotations.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2013-02-27 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27  2:05 [Bug gdb/15205] New: GDB document about option "-fullname" is inconsistent with the behavior in CLI asmwarrior at gmail dot com
2013-02-27  2:21 ` [Bug gdb/15205] " asmwarrior at gmail dot com
2013-02-27  9:41 ` palves at redhat dot com
2013-02-27 15:08 ` asmwarrior at gmail dot com
2013-02-27 15:40 ` palves at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).