This is the mail archive of the gdb-patches@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]

Re: recurse.exp: watch on local variable that goes out of scope


Eli Zaretskii wrote:

So it sounds like your low-level target-side support misbehaves in this case: I386_DR_LOW_GET_STATUS should map into a system call that returns the contents of the DR6 debug register. If the returned value says that one of the watched addresses was written to, there's nothing GDB can do except report that and act accordingly.

Actually, this isn't an i386 remote target: it's my i386 Linux host. I'm sorry if I sent you off in the wrong direction (I guess I should have been more specific than just "i386").


Just to be clear on what the problem is: recurse.exp on an i386 Linux host is all PASS; I just don't understand why it works the way it does.

There are actually two things that don't make sense to me:

1. Why the i386 reports a watchpoint hit when reaching the watchpoint scope del breakpoint if the watchpoint has been hit previously (but not otherwise).

2. Compare the "Mimicking recurse.exp" and "Watch on return statement" examples in my previous e-mail: in both cases GDB notices that the watched variable goes out of scope, but stops only in the first case (where out of scope is detected by watchpoint_check) and not in the second case (where out of scope is detected by insert_bp_location).

--
Orjan Friberg
Axis Communications


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