This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/19517] New: statistics mode doesnt work as expected in remote debugging
- From: "blitz.opensource at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 25 Jan 2016 01:03:10 +0000
- Subject: [Bug gdb/19517] New: statistics mode doesnt work as expected in remote debugging
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19517
Bug ID: 19517
Summary: statistics mode doesnt work as expected in remote
debugging
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: blitz.opensource at gmail dot com
Target Milestone: ---
Created attachment 8922
--> https://sourceware.org/bugzilla/attachment.cgi?id=8922&action=edit
test code
Hi,
As per documentation in gdb statistics option-
causes gdb to print statistics about time and memory usage "after it completes
each command and returns to the prompt."
In remote debugging though the statistic command returns before we return to
the prompt. For e.g. in the attached code the following is the gdb session
info-
karthik@kvbhat:~/Desktop$ gdb a.out -statistics
GNU gdb (GDB) 7.10
Copyright (C) 2015 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 "i686-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...done.
Startup time: 0.007074 (cpu), 0.008271 (wall)
Space used: 532480 (+532480 during startup)
(gdb) target remote :9999
Remote debugging using :9999
warning: Can not parse XML target description; XML support was disabled at
compile time
Reading /lib/ld-linux.so.2 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to
access files locally instead.
Reading /lib/ld-linux.so.2 from remote target...
Reading symbols from target:/lib/ld-linux.so.2...Reading
/lib/ld-2.20-2014.11.so.debug from remote target...
Reading /lib/.debug/ld-2.20-2014.11.so.debug from remote target...
(no debugging symbols found)...done.
0xb7fdcab0 in ?? () from target:/lib/ld-linux.so.2
Command execution time: 0.021322 (cpu), 0.468869 (wall)
Space used: 667648 (+135168 for this command)
(gdb) b main
Breakpoint 1 at 0x80484a6: file test.c, line 5.
Command execution time: 0.000667 (cpu), 0.003748 (wall)
Space used: 667648 (+0 for this command)
(gdb) b 9
Breakpoint 2 at 0x80484d1: file test.c, line 9.
Command execution time: 0.000516 (cpu), 0.002002 (wall)
Space used: 667648 (+0 for this command)
(gdb) c
Continuing.
Command execution time: 0.000445 (cpu), 0.004348 (wall)
Space used: 667648 (+0 for this command)
Reading /usr/lib/libsys-assert.so from remote target...
Reading /lib/libc.so.6 from remote target...
Reading /usr/lib/libunwind.so.8 from remote target...
Reading /lib/libdl.so.2 from remote target...
Reading /usr/lib/libsys-assert.so.debug from remote target...
Reading /usr/lib/.debug/libsys-assert.so.debug from remote target...
Reading /lib/libc-2.20-2014.11.so.debug from remote target...
Reading /lib/.debug/libc-2.20-2014.11.so.debug from remote target...
Reading /usr/lib/libunwind.so.8.0.1.debug from remote target...
Reading /usr/lib/.debug/libunwind.so.8.0.1.debug from remote target...
Reading /lib/libdl-2.20-2014.11.so.debug from remote target...
Reading /lib/.debug/libdl-2.20-2014.11.so.debug from remote target...
Breakpoint 1, main () at test.c:5
5 i = 10+1;
(gdb) c
Continuing.
Command execution time: 0.000367 (cpu), 0.003211 (wall)
Space used: 1351680 (+0 for this command)
Breakpoint 2, main () at test.c:9
9 printf("%d\n",k);
(gdb)
As seen above the o/p of statistic command should have come after breakpoint is
hit at line 9.(this is the behavior when debugging on host machine) but in case
of remote debugging though we get the Command execution time before the command
has actually completed execution on target.
Could someone help we regarding this bug.
Thanks
Karthik
--
You are receiving this mail because:
You are on the CC list for the bug.