diff options
author | Jonathan Larmour <jifl@eCosCentric.com> | 2008-06-27 18:56:34 +0000 |
---|---|---|
committer | Jonathan Larmour <jifl@eCosCentric.com> | 2008-06-27 18:56:34 +0000 |
commit | 7c0f6dcc1a42f4432e4d26bf2eeceef44f73b6f3 (patch) | |
tree | 9b5e004a892d6a8726112e13bc05605a6c65830c /gdb/remote.c | |
parent | 4b4374ecf1894e7de8a3baa4714a8a6510b6bc74 (diff) | |
download | gdb-7c0f6dcc1a42f4432e4d26bf2eeceef44f73b6f3.zip gdb-7c0f6dcc1a42f4432e4d26bf2eeceef44f73b6f3.tar.gz gdb-7c0f6dcc1a42f4432e4d26bf2eeceef44f73b6f3.tar.bz2 |
* remote.c (remote_insert_breakpoint): Ensure that if Z0
unsupported and we fall back to memory_insert_breakpoint, we
use the unmodified requested address.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 32ee5e4..e71c467 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5339,12 +5339,13 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt) if (remote_protocol_packets[PACKET_Z0].support != PACKET_DISABLE) { - CORE_ADDR addr; + CORE_ADDR addr = bp_tgt->placed_address; struct remote_state *rs; char *p; + int bpsize; gdbarch_breakpoint_from_pc - (current_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size); + (current_gdbarch, &addr, &bpsize); rs = get_remote_state (); p = rs->buf; @@ -5352,9 +5353,9 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt) *(p++) = 'Z'; *(p++) = '0'; *(p++) = ','; - addr = (ULONGEST) remote_address_masked (bp_tgt->placed_address); + addr = (ULONGEST) remote_address_masked (addr); p += hexnumstr (p, addr); - sprintf (p, ",%d", bp_tgt->placed_size); + sprintf (p, ",%d", bpsize); putpkt (rs->buf); getpkt (&rs->buf, &rs->buf_size, 0); @@ -5364,6 +5365,8 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt) case PACKET_ERROR: return -1; case PACKET_OK: + bp_tgt->placed_address = addr; + bp_tgt->placed_size = bpsize; return 0; case PACKET_UNKNOWN: break; |