From: Marc Khouzam <marc.khouzam@ericsson.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Regression loading a tracefile in 7_3
Date: Fri, 20 May 2011 02:06:00 -0000 [thread overview]
Message-ID: <F7CE05678329534C957159168FA70DEC577E916171@EUSAACMS0703.eamcs.ericsson.se> (raw)
Hi,
I believe I'm seeing a regression loading a tracefile in GDB 7.3
I create a simple tracefile using GDB/gdbserver 7.3 but when I try to load
that tracefile, I get an error about "PC register is not available", which
causes my Eclipse session to abort. This is not happening in 7.2 or 7.2.1.
> gdb.7.3 a.out
GNU gdb (GDB) 7.2.90.20110519-cvs
(gdb) interpreter-exec mi "-target-select tfile trace.7.3"
~"Created tracepoint 1 for target's tracepoint 1 at 0x804851f.\n"
^error,msg="PC register is not available"
Things might be ok after that, meaning that tstatus seems ok, and
tfind works ok. But the ^error reply is a problem.
It's caused by a recent added check in regcache.c:regcache_read_pc ()
for the return value of regcache_cooked_read_unsigned()
if (regcache_cooked_read_unsigned (regcache,
gdbarch_pc_regnum (gdbarch),
&raw_val) == REG_UNAVAILABLE)
throw_error (NOT_AVAILABLE_ERROR, _("PC register is not available"));
I don't know if I'm doing something wrong, but I wanted to report it right
away to avoid having a regression in the 7.3 release.
Any help appreciated.
Thanks
Marc
Below is how I created the trace file:
> gdb.7.3 a.out
GNU gdb (GDB) 7.2.90.20110519-cvs
(gdb) target remote :9999
Remote debugging using :9999
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
0x00258850 in ?? () from /lib/ld-linux.so.2
(gdb) l
1 #include <unistd.h>
2 #include <stdio.h>
3
4 int main() {
5 int max = 9;
6 for (int i=0;i<max;i++) {
7 printf("i is %d\n",i);
8 sleep(1);
9 }
10 return 0;
(gdb) trace 7
Tracepoint 1 at 0x804851f: file loopfirst.cc, line 7.
(gdb) command
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>collect $locals
>end
(gdb) tstart
(gdb) b 10
Breakpoint 2 at 0x8048553: file loopfirst.cc, line 10.
(gdb) c
Continuing.
Breakpoint 2, main () at loopfirst.cc:10
10 return 0;
(gdb) tstop
(gdb) tstatus
Trace stopped by a tstop command.
Collected 9 trace frames.
Trace buffer has 5239739 bytes of 5242880 bytes free (0% full).
Trace will stop if GDB disconnects.
Not looking at any trace frame.
(gdb) tsave trace.7.3
Trace data saved to file 'trace.7.3'.
next reply other threads:[~2011-05-20 2:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 2:06 Marc Khouzam [this message]
2011-05-20 10:46 ` Pedro Alves
2011-05-20 11:58 ` Pedro Alves
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=F7CE05678329534C957159168FA70DEC577E916171@EUSAACMS0703.eamcs.ericsson.se \
--to=marc.khouzam@ericsson.com \
--cc=gdb@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).