This is the mail archive of the frysk@sourceware.org mailing list for the frysk 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]

Re: hpd command for DisplayValues


BTW, a gdb interaction looks like the below. The background to know is that "display" and "examine" are closely related vis:

(gdb) x/i $pc
0x807b6c0 <main>:       lea    0x4(%esp),%ecx
(gdb) stepi
0x0807b6c4      28      {
(gdb) x/i $pc
0x807b6c4 <main+4>:     and    $0xfffffff0,%esp
(gdb) stepi
0x0807b6c7      28      {
(gdb) display/i $pc
1: x/i $pc  0x807b6c7 <main+7>: pushl  0xfffffffc(%ecx)
(gdb) stepi
0x0807b6ca in main (argc=0x1, argv=0xbff4d0d4) at ../../gdb/gdb.c:28
28      {
1: x/i $pc  0x807b6ca <main+10>:        push   %ebp
(gdb)
0x0807b6cb      28      {
1: x/i $pc  0x807b6cb <main+11>:        mov    %esp,%ebp

The output reflects how "display" is implemented using the lower-level "examine" command - it doesn't detect change.

Andrew


Adam Jocksch wrote:
Andrew Cagney wrote:
Adam Jocksch wrote:
Hrm, maybe. Although reading in the hpd spec: "By defining actionpoints, the user may request in advance that target program execution stop

Nice quote, the display object doesn't fit that model since it is passive - it doesn't directly trigger a stop since it doesn't implement a mechanism for detecting changes in the data (that would be watch). Instead it detects when the variable has changed after a stop.


For the command line, consider this:

[] break main
[] run ....
main hit
[] print argc
...
[] step
[] print argc
[] step

vs:


[] break main
[] run ....
main hit
[] display argc
...
[] step
... value of argc changed from 4 to -1
[] step
[] step
Value of argc changed from -1 to 4

For a graphical interface the object facilitates the efficient implementation of a variable display window - it will only trigger a redraw of the display elements of the X display when there's something new to draw.


Andrew

under certain conditions". Do we want the display to be similar to a watchpoint, except it applies to an expression rather than a single variable? Or do we want it to be an expression that is displayed when the program stops (I remember Andrew saying something about how gdb does this, and it's bad, so we probably want to avoid that).

While what the DisplayValue object is capable is well defined, I guess I'm not 100% sure of how it will be used.

That sounds similar to what I had envisioned.


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