diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-11-06 18:22:45 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-11-06 18:22:45 +0000 |
commit | ffce0d52cd3abb8e58cf5e6eb7e39c286443b82b (patch) | |
tree | 9404bab38bc8c94fad22b2f3150b86842ec40c30 /gdb | |
parent | e049a4b52e7b68f3bc47d4221c6fe84d03ccf1cf (diff) | |
download | gdb-ffce0d52cd3abb8e58cf5e6eb7e39c286443b82b.zip gdb-ffce0d52cd3abb8e58cf5e6eb7e39c286443b82b.tar.gz gdb-ffce0d52cd3abb8e58cf5e6eb7e39c286443b82b.tar.bz2 |
* breakpoint.c (read_memory_nobpt): Use ALL_BP_LOCATIONS
instead of ALL_BREAKPOINTS. Check for software breakpoints only.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/breakpoint.c | 23 |
2 files changed, 14 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ab0bb3..2938b2f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2003-11-06 Daniel Jacobowitz <drow@mvista.com> + * breakpoint.c (read_memory_nobpt): Use ALL_BP_LOCATIONS + instead of ALL_BREAKPOINTS. Check for software breakpoints only. + +2003-11-06 Daniel Jacobowitz <drow@mvista.com> + * breakpoint.c (allocate_bp_location): Take bpt and bp_type arguments. Initialize owner and type for the new breakpoint location item. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9294cef..87ce33c 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -625,7 +625,7 @@ int read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len) { int status; - struct breakpoint *b; + struct bp_location *b; CORE_ADDR bp_addr = 0; int bp_size = 0; @@ -633,20 +633,15 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len) /* No breakpoints on this machine. */ return target_read_memory (memaddr, myaddr, len); - ALL_BREAKPOINTS (b) + ALL_BP_LOCATIONS (b) { - if (b->type == bp_none) - warning ("reading through apparently deleted breakpoint #%d?", - b->number); + if (b->owner->type == bp_none) + warning ("reading through apparently deleted breakpoint #%d?", + b->owner->number); - /* memory breakpoint? */ - if (b->type == bp_watchpoint - || b->type == bp_hardware_watchpoint - || b->type == bp_read_watchpoint - || b->type == bp_access_watchpoint) + if (b->loc_type != bp_loc_software_breakpoint) continue; - /* bp in memory? */ - if (!b->loc->inserted) + if (!b->inserted) continue; /* Addresses and length of the part of the breakpoint that we need to copy. */ @@ -654,7 +649,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len) breakpoint values. BREAKPOINT_FROM_PC still manages to correctly determine the breakpoints memory address and size for these targets. */ - bp_addr = b->loc->address; + bp_addr = b->address; bp_size = 0; if (BREAKPOINT_FROM_PC (&bp_addr, &bp_size) == NULL) continue; @@ -690,7 +685,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len) } memcpy (myaddr + bp_addr - memaddr, - b->loc->shadow_contents + bptoffset, bp_size); + b->shadow_contents + bptoffset, bp_size); if (bp_addr > memaddr) { |