This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

breakpoints/1500: Inconsistency in Tracepoint documentation / implementation in gdb


>Number:         1500
>Category:       breakpoints
>Synopsis:       Inconsistency in Tracepoint documentation / implementation in gdb
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          mistaken
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 05 12:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ramana Radhakrishnan
>Release:        Current Head
>Organization:
>Environment:
Suse Linux 9.0 , gdb-cvs 2004-01-02,built with gcc -3.3.1 default with Suse Linux 9.0 , GNU ld version 2.14.90.0.5 20030722 (SuSE Linux)
>Description:
Inconsistent behaviour by gdb with respect to Remote Tracepoints. This is with respect to Agent Expressions. 

The experiment performed is as follows 

(gdb) file a.out
A program is being debugged already.  Kill it? (y or n) y
Sending packet: $k#6b...Ack
Load new symbol table from "a.out"? (y or n) y
Reading symbols from a.out...done.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect $esp + $ebp
Illegal combination of types in addition.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
> collect $eax + $ebx
> end
(gdb) target remote test3:12345
Remote debugging using test3:12345
Sending packet: $Hc-1#09...Ack
Packet received: OK
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: T0505:00000000;04:90e6ffbf;08:100c0040;
Sending packet: $m40000c10,8#89...Ack
Packet received: 89e0e8f900000089
Sending packet: $m40000c10,7#88...Ack
Packet received: 89e0e8f9000000
0x40000c10 in ?? ()
Sending packet: $m8049448,c8#a9...Ack
Packet received: 01000000010000000c0000000c8204080d000000148404080400000028810408050000008c810408060000004c8104080a000000450000000b000000100000001500000000000000030000002495040802000000080000001400000011000000170000000482040811000000fc81040812000000080000001300000008000000feffff6fdc810408ffffff6f01000000f0ffff6fd2810408000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sending packet: $qSymbol::#5b...Ack
Packet received: qSymbol:5f5f707468726561645f746872656164735f6576656e7473
Packet qSymbol (symbol-lookup) is supported
Sending packet: $qSymbol::5f5f707468726561645f746872656164735f6576656e7473#47...Ack
Packet received: OK
(gdb) tstart
Sending packet: $QTinit#59...Ack
Packet received: OK
Sending packet: $QTDP:1:0804831c:E:0:0-#29...Ack
Packet received: OK
Sending packet: $QTDP:-1:0804831c:R09-#f8...Ack
Packet received: OK
Sending packet: $QTDP:-1:0804831c:X0000000F,260000162026000316200216202927#0e...Ack
Packet received: OK
Sending packet: $QTro:080480f4,08048107:08048108,08048128:08048128,0804814c:0804814c,0804818c:0804818c,080481d1:080481d2,080481da:080481dc,080481fc:080481fc,08048204:08048204,0804820c:0804820c,08048223:08048224,08048244:08048250,08048414:08048414,0804842e:08048430,08048438:08049444,08049448#47...Ack
Packet received: OK
Sending packet: $QTStart#b3...Ack
Packet received: OK
(gdb) tstop
Sending packet: $QTStop#4b...Ack
Packet received: OK
(gdb) tdump
warning: No current trace frame.
(gdb) tfind
Sending packet: $QTFrame:0#fa...Ack
Packet received: F0T1
Sending packet: $Hg0#df...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received: 00000000b49b1b4090441640d82f16404ce6ffbf68e6ffbf2084014094e6ffbf1c83040882030000230000002b0000002b0000002b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f03000000000000ffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000ffffffff
#0  main () at try.c:7
7       }
(gdb) tdump
Data collected at tracepoint 1, trace frame 0:


The inconsistency is with respect to packets sent out during tfind. The problem is that the documentation would assume that the collect command would only collect the value of the expression(s) provided.

collect $eax+$ebx would mean just the result of $eax+$ebx is collected by the stub. However gdb when it does a tdump wants to find the values of the induvidual components of the expression. This is not documented correctly in the info pages. 

However the Agent expression code generated is as follows
aopreg $eax
aopreg $ebx
aopadd -- There is actually no need for this aopadd / any operations to be performed at the target side in this case. 





>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]