* [RFA] Try2: Ignore breakpoints when reading memory.
@ 2008-02-24 14:58 Vladimir Prus
2008-02-24 20:08 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Vladimir Prus @ 2008-02-24 14:58 UTC (permalink / raw)
To: gdb-patches
This a second attempt at making gdb always ignore
any memory breakpoints that are inserted and show the original
memory content. This patch is the immediate prerequisite for the
patch that makes breakpoints always inserted.
Unlike the previous patch, there's a mechanism to:
1. Control the new behaviour from command line.
2. Temporary force specific behavior, if some code
needs it.
OK?
- Volodya
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Use breakpoint_restore_shadows.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints, show_show_memory_breakpoints): New.
(initialize_targets): Register set/show 'show-memory-breakpoints'.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
---
gdb/breakpoint.c | 83 +++++++++++++++++++++----------------------------
gdb/breakpoint.h | 4 ++
gdb/ppc-linux-tdep.c | 4 ++
gdb/target.c | 52 +++++++++++++++++++++++++++++--
gdb/target.h | 5 +++
5 files changed, 98 insertions(+), 50 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index dca4ca1..9a7800c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -712,14 +712,26 @@ commands_from_control_command (char *arg, struct command_line *cmd)
int
read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr, unsigned len)
{
- int status;
- const struct bp_location *b;
+ int status = 0;
+ /* Make sure the following read will ignore memory breakpoints. */
+ struct cleanup *cleanup = make_show_memory_breakpoints_cleanup (0);
+
+ status = target_read_memory (memaddr, myaddr, len);
+
+ do_cleanups (cleanup);
+
+ return status;
+}
+
+void
+breakpoint_restore_shadows (gdb_byte *buf,
+ ULONGEST memaddr,
+ LONGEST len)
+{
+ struct bp_location *b;
CORE_ADDR bp_addr = 0;
int bp_size = 0;
-
- if (gdbarch_breakpoint_from_pc (current_gdbarch, &bp_addr, &bp_size) == NULL)
- /* No breakpoints on this machine. */
- return target_read_memory (memaddr, myaddr, len);
+ int bptoffset = 0;
ALL_BP_LOCATIONS (b)
{
@@ -738,60 +750,37 @@ read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr, unsigned len)
if (bp_size == 0)
/* bp isn't valid, or doesn't shadow memory. */
continue;
+
if (bp_addr + bp_size <= memaddr)
/* The breakpoint is entirely before the chunk of memory we
are reading. */
continue;
+
if (bp_addr >= memaddr + len)
/* The breakpoint is entirely after the chunk of memory we are
reading. */
continue;
- /* Copy the breakpoint from the shadow contents, and recurse for
- the things before and after. */
- {
- /* Offset within shadow_contents. */
- int bptoffset = 0;
-
- if (bp_addr < memaddr)
- {
- /* Only copy the second part of the breakpoint. */
- bp_size -= memaddr - bp_addr;
- bptoffset = memaddr - bp_addr;
- bp_addr = memaddr;
- }
- if (bp_addr + bp_size > memaddr + len)
- {
- /* Only copy the first part of the breakpoint. */
- bp_size -= (bp_addr + bp_size) - (memaddr + len);
- }
-
- memcpy (myaddr + bp_addr - memaddr,
- b->target_info.shadow_contents + bptoffset, bp_size);
+ /* Offset within shadow_contents. */
+ if (bp_addr < memaddr)
+ {
+ /* Only copy the second part of the breakpoint. */
+ bp_size -= memaddr - bp_addr;
+ bptoffset = memaddr - bp_addr;
+ bp_addr = memaddr;
+ }
- if (bp_addr > memaddr)
- {
- /* Copy the section of memory before the breakpoint. */
- status = read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
- if (status != 0)
- return status;
- }
+ if (bp_addr + bp_size > memaddr + len)
+ {
+ /* Only copy the first part of the breakpoint. */
+ bp_size -= (bp_addr + bp_size) - (memaddr + len);
+ }
- if (bp_addr + bp_size < memaddr + len)
- {
- /* Copy the section of memory after the breakpoint. */
- status = read_memory_nobpt (bp_addr + bp_size,
- myaddr + bp_addr + bp_size - memaddr,
- memaddr + len - (bp_addr + bp_size));
- if (status != 0)
- return status;
- }
- return 0;
- }
+ memcpy (buf + bp_addr - memaddr,
+ b->target_info.shadow_contents + bptoffset, bp_size);
}
- /* Nothing overlaps. Just call read_memory_noerr. */
- return target_read_memory (memaddr, myaddr, len);
}
+
\f
/* A wrapper function for inserting catchpoints. */
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 41730c0..159c406 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -854,4 +854,8 @@ extern int deprecated_remove_raw_breakpoint (void *);
target. */
int watchpoints_triggered (struct target_waitstatus *);
+extern void breakpoint_restore_shadows (gdb_byte *buf,
+ ULONGEST memaddr,
+ LONGEST len);
+
#endif /* !defined (BREAKPOINT_H) */
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 4b35f7f..bf084f5 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -280,12 +280,15 @@ ppc_linux_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
int val;
int bplen;
gdb_byte old_contents[BREAKPOINT_MAX];
+ struct cleanup *cleanup;
/* Determine appropriate breakpoint contents and size for this address. */
bp = gdbarch_breakpoint_from_pc (current_gdbarch, &addr, &bplen);
if (bp == NULL)
error (_("Software breakpoints not implemented for this target."));
+ /* Make sure we see the memory breakpoints. */
+ cleanup = make_show_memory_breakpoints_cleanup (1);
val = target_read_memory (addr, old_contents, bplen);
/* If our breakpoint is no longer at the address, this means that the
@@ -294,6 +297,7 @@ ppc_linux_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
if (val == 0 && memcmp (bp, old_contents, bplen) == 0)
val = target_write_memory (addr, bp_tgt->shadow_contents, bplen);
+ do_cleanups (cleanup);
return val;
}
diff --git a/gdb/target.c b/gdb/target.c
index 87ddf24..32271eb 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -203,6 +203,18 @@ int attach_flag;
static int trust_readonly = 0;
+/* Nonzero if we should show true memory content including
+ memory breakpoint inserted by gdb. */
+
+static int show_memory_breakpoints = 0;
+
+static void
+show_show_memory_breakpoints (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("Memory breakpoints show mode is %s.\n"), value);
+}
+
/* Non-zero if we want to see trace of target level stuff. */
static int targetdebug = 0;
@@ -1064,7 +1076,11 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
if (res <= 0)
return -1;
else
- return res;
+ {
+ if (readbuf && !show_memory_breakpoints)
+ breakpoint_restore_shadows (readbuf, memaddr, reg_len);
+ return res;
+ }
}
/* If none of those methods found the memory we wanted, fall back
@@ -1082,22 +1098,40 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
res = ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL,
readbuf, writebuf, memaddr, reg_len);
if (res > 0)
- return res;
+ break;
/* We want to continue past core files to executables, but not
past a running target's memory. */
if (ops->to_has_all_memory)
- return res;
+ break;
ops = ops->beneath;
}
while (ops != NULL);
+ if (readbuf && !show_memory_breakpoints)
+ breakpoint_restore_shadows (readbuf, memaddr, reg_len);
+
/* If we still haven't got anything, return the last error. We
give up. */
return res;
}
+static void
+restore_show_memory_breakpoints (void *arg)
+{
+ show_memory_breakpoints = (int)arg;
+}
+
+struct cleanup *
+make_show_memory_breakpoints_cleanup (int show)
+{
+ int current = show_memory_breakpoints;
+ show_memory_breakpoints = show;
+
+ return make_cleanup (restore_show_memory_breakpoints, (void *)current);
+}
+
static LONGEST
target_xfer_partial (struct target_ops *ops,
enum target_object object, const char *annex,
@@ -2798,6 +2832,18 @@ result in significant performance improvement for remote targets."),
show_trust_readonly,
&setlist, &showlist);
+ add_setshow_boolean_cmd ("show-memory-breakpoints", class_support,
+ &show_memory_breakpoints, _("\
+Set mode for showing memory breakpoints."), _("\
+Show mode for showing memory breakpoints."), _("\
+When this mode is off (which is default), all memory reads will return\n\
+memory content as if no memory breakpoint were inserted. When this mode\n\
+if on, memory reads will see inserted memory breakpoints. In particular,\n\
+the disassemble command will show the breakpoint instructions."),
+ NULL,
+ show_show_memory_breakpoints,
+ &setlist, &showlist);
+
add_com ("monitor", class_obscure, do_monitor_command,
_("Send a command to the remote monitor (remote targets only)."));
diff --git a/gdb/target.h b/gdb/target.h
index 3f332fd..dcc5cee 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1248,6 +1248,11 @@ extern enum target_signal target_signal_from_command (int);
/* Any target can call this to switch to remote protocol (in remote.c). */
extern void push_remote_target (char *name, int from_tty);
+
+/* Set the show memory breakpoints mode to show, and installs a cleanup
+ to restore it back to the current value. */
+extern struct cleanup * make_show_memory_breakpoints_cleanup (int show);
+
\f
/* Imported from machine dependent code */
--
1.5.3.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-02-24 14:58 [RFA] Try2: Ignore breakpoints when reading memory Vladimir Prus
@ 2008-02-24 20:08 ` Eli Zaretskii
2008-02-25 19:30 ` Michael Snyder
2008-03-10 20:43 ` Daniel Jacobowitz
2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2008-02-24 20:08 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sun, 24 Feb 2008 17:50:39 +0300
>
>
> This a second attempt at making gdb always ignore
> any memory breakpoints that are inserted and show the original
> memory content.
What about documentation and NEWS?
> +When this mode is off (which is default), all memory reads will return\n\
When this mode is off (the default), ...
> +the disassemble command will show the breakpoint instructions."),
the disassemble command will show inserted breakpoint instructions.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-02-24 14:58 [RFA] Try2: Ignore breakpoints when reading memory Vladimir Prus
2008-02-24 20:08 ` Eli Zaretskii
@ 2008-02-25 19:30 ` Michael Snyder
2008-02-26 0:53 ` Joel Brobecker
2008-03-10 20:43 ` Daniel Jacobowitz
2 siblings, 1 reply; 8+ messages in thread
From: Michael Snyder @ 2008-02-25 19:30 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
On Sun, 2008-02-24 at 17:50 +0300, Vladimir Prus wrote:
> This patch is the immediate prerequisite for the
> patch that makes breakpoints always inserted.
Hmmm? Did I miss this discussion?
I'm not sure leaving breakpoints always inserted is a good idea.
If gdb becomes unexpectedly disconnected from the target/child,
these breakpoints become an instant problem, and even if you
can manage to re-connect, it's not a given that you can then
remove them.
This can already happen (eg. if you have a remote target, and
you lose the serial connection while the target is in a "run"
state), but it seems like this change would increase the
likelyhood of this happening.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-02-25 19:30 ` Michael Snyder
@ 2008-02-26 0:53 ` Joel Brobecker
0 siblings, 0 replies; 8+ messages in thread
From: Joel Brobecker @ 2008-02-26 0:53 UTC (permalink / raw)
To: Michael Snyder; +Cc: Vladimir Prus, gdb-patches
> On Sun, 2008-02-24 at 17:50 +0300, Vladimir Prus wrote:
> > This patch is the immediate prerequisite for the
> > patch that makes breakpoints always inserted.
>
> Hmmm? Did I miss this discussion?
I think this is part of:
Non-stop multi-threaded debugging
http://sourceware.org/ml/gdb/2007-11/msg00198.html
You need to leave the breakpoints inserted if you are to allow
the other threads to continue running.
> I'm not sure leaving breakpoints always inserted is a good idea.
> If gdb becomes unexpectedly disconnected from the target/child,
> these breakpoints become an instant problem, and even if you
> can manage to re-connect, it's not a given that you can then
> remove them.
That's indeed a risk, but I believe that this behavior would not
be the default.
Incidentally, I think this could also be very useful in the context
of very very slow debugging lines. We very recently had a customer
who asked about the reason for removing the breakpoints at every stop,
because apparently with his JTAG probe, inserting 30 breakpoints and
then removing them takes a long time (~10secs). We have also verified
that writing memory takes equally long. The customer is still waiting
to hear from the manufacturer about this lack of performance which seems
a bit suspicious, but having the option of keeping the breakpoints
inserted in this case would be a nice work-around.
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-02-24 14:58 [RFA] Try2: Ignore breakpoints when reading memory Vladimir Prus
2008-02-24 20:08 ` Eli Zaretskii
2008-02-25 19:30 ` Michael Snyder
@ 2008-03-10 20:43 ` Daniel Jacobowitz
2008-03-10 20:57 ` Vladimir Prus
2 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2008-03-10 20:43 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
On Sun, Feb 24, 2008 at 05:50:39PM +0300, Vladimir Prus wrote:
>
> This a second attempt at making gdb always ignore
> any memory breakpoints that are inserted and show the original
> memory content. This patch is the immediate prerequisite for the
> patch that makes breakpoints always inserted.
>
> Unlike the previous patch, there's a mechanism to:
> 1. Control the new behaviour from command line.
Do you think we need the option is useful? I think we'll want one for
leave-breakpoints-inserted mode, which is a bigger change, but this
patch should only affect GDB internals.
> +static void
> +restore_show_memory_breakpoints (void *arg)
> +{
> + show_memory_breakpoints = (int)arg;
> +}
This will fail with -Werror on a 64-bit host.
That leaves the attached patch. Tested on x86_64-linux, no
regressions. How's it look? I deleted read_memory_nobpt
entirely.
--
Daniel Jacobowitz
CodeSourcery
2008-03-10 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* breakpoint.h (breakpoint_restore_shadows): New
declaration.
* breakpoint.c (breakpoint_restore_shadows): New.
(read_memory_nobpt): Delete.
* gdbcore.h (read_memory_nobpt): Delete declaration.
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
(make_show_memory_beakpoints_cleanup): New.
(show_memory_breakpoints): New.
* target.h (make_show_memory_beakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
* alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.987
diff -u -p -r1.987 Makefile.in
--- Makefile.in 5 Mar 2008 17:21:10 -0000 1.987
+++ Makefile.in 10 Mar 2008 20:21:45 -0000
@@ -2873,7 +2873,7 @@ symtab.o: symtab.c $(defs_h) $(symtab_h)
target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
$(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
$(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) \
- $(exceptions_h) $(target_descriptions_h)
+ $(exceptions_h) $(target_descriptions_h) $(gdb_stdint_h)
target-descriptions.o: target-descriptions.c $(defs_h) $(arch_utils_h) \
$(target_h) $(target_descriptions_h) $(vec_h) $(xml_tdesc_h) \
$(gdbcmd_h) $(gdb_assert_h) $(gdbtypes_h) $(reggroups_h) \
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.182
diff -u -p -r1.182 alpha-tdep.c
--- alpha-tdep.c 20 Feb 2008 15:45:20 -0000 1.182
+++ alpha-tdep.c 10 Mar 2008 20:21:45 -0000
@@ -638,7 +638,7 @@ alpha_read_insn (CORE_ADDR pc)
gdb_byte buf[ALPHA_INSN_SIZE];
int status;
- status = read_memory_nobpt (pc, buf, sizeof (buf));
+ status = target_read_memory (pc, buf, sizeof (buf));
if (status)
memory_error (status, pc);
return extract_unsigned_integer (buf, sizeof (buf));
Index: alphanbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alphanbsd-tdep.c,v
retrieving revision 1.36
diff -u -p -r1.36 alphanbsd-tdep.c
--- alphanbsd-tdep.c 1 Jan 2008 22:53:09 -0000 1.36
+++ alphanbsd-tdep.c 10 Mar 2008 20:21:45 -0000
@@ -216,7 +216,7 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
LONGEST off;
int i;
- if (read_memory_nobpt (pc, (char *) w, 4) != 0)
+ if (target_read_memory (pc, (char *) w, 4) != 0)
return -1;
for (i = 0; i < RETCODE_NWORDS; i++)
@@ -230,7 +230,7 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
off = i * 4;
pc -= off;
- if (read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ if (target_read_memory (pc, (char *) ret, sizeof (ret)) != 0)
return -1;
if (memcmp (ret, sigtramp_retcode, RETCODE_SIZE) == 0)
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.305
diff -u -p -r1.305 breakpoint.c
--- breakpoint.c 3 Mar 2008 13:24:12 -0000 1.305
+++ breakpoint.c 10 Mar 2008 20:21:46 -0000
@@ -702,25 +702,16 @@ commands_from_control_command (char *arg
error (_("No breakpoint number %d."), bnum);
}
\f
-/* Like target_read_memory() but if breakpoints are inserted, return
- the shadow contents instead of the breakpoints themselves.
+/* Update BUF, which is LEN bytes read from the target address MEMADDR,
+ by replacing any memory breakpoints with their shadowed contents. */
- Read "memory data" from whatever target or inferior we have.
- Returns zero if successful, errno value if not. EIO is used
- for address out of bounds. If breakpoints are inserted, returns
- shadow contents, not the breakpoints themselves. From breakpoint.c. */
-
-int
-read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr, unsigned len)
+void
+breakpoint_restore_shadows (gdb_byte *buf, ULONGEST memaddr, LONGEST len)
{
- int status;
- const struct bp_location *b;
+ struct bp_location *b;
CORE_ADDR bp_addr = 0;
int bp_size = 0;
-
- if (gdbarch_breakpoint_from_pc (current_gdbarch, &bp_addr, &bp_size) == NULL)
- /* No breakpoints on this machine. */
- return target_read_memory (memaddr, myaddr, len);
+ int bptoffset = 0;
ALL_BP_LOCATIONS (b)
{
@@ -739,59 +730,35 @@ read_memory_nobpt (CORE_ADDR memaddr, gd
if (bp_size == 0)
/* bp isn't valid, or doesn't shadow memory. */
continue;
+
if (bp_addr + bp_size <= memaddr)
/* The breakpoint is entirely before the chunk of memory we
are reading. */
continue;
+
if (bp_addr >= memaddr + len)
/* The breakpoint is entirely after the chunk of memory we are
reading. */
continue;
- /* Copy the breakpoint from the shadow contents, and recurse for
- the things before and after. */
- {
- /* Offset within shadow_contents. */
- int bptoffset = 0;
-
- if (bp_addr < memaddr)
- {
- /* Only copy the second part of the breakpoint. */
- bp_size -= memaddr - bp_addr;
- bptoffset = memaddr - bp_addr;
- bp_addr = memaddr;
- }
-
- if (bp_addr + bp_size > memaddr + len)
- {
- /* Only copy the first part of the breakpoint. */
- bp_size -= (bp_addr + bp_size) - (memaddr + len);
- }
- memcpy (myaddr + bp_addr - memaddr,
- b->target_info.shadow_contents + bptoffset, bp_size);
+ /* Offset within shadow_contents. */
+ if (bp_addr < memaddr)
+ {
+ /* Only copy the second part of the breakpoint. */
+ bp_size -= memaddr - bp_addr;
+ bptoffset = memaddr - bp_addr;
+ bp_addr = memaddr;
+ }
- if (bp_addr > memaddr)
- {
- /* Copy the section of memory before the breakpoint. */
- status = read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
- if (status != 0)
- return status;
- }
+ if (bp_addr + bp_size > memaddr + len)
+ {
+ /* Only copy the first part of the breakpoint. */
+ bp_size -= (bp_addr + bp_size) - (memaddr + len);
+ }
- if (bp_addr + bp_size < memaddr + len)
- {
- /* Copy the section of memory after the breakpoint. */
- status = read_memory_nobpt (bp_addr + bp_size,
- myaddr + bp_addr + bp_size - memaddr,
- memaddr + len - (bp_addr + bp_size));
- if (status != 0)
- return status;
- }
- return 0;
- }
+ memcpy (buf + bp_addr - memaddr,
+ b->target_info.shadow_contents + bptoffset, bp_size);
}
- /* Nothing overlaps. Just call read_memory_noerr. */
- return target_read_memory (memaddr, myaddr, len);
}
\f
@@ -4299,7 +4266,7 @@ set_raw_breakpoint (struct symtab_and_li
/* Adjust the breakpoint's address prior to allocating a location.
Once we call allocate_bp_location(), that mostly uninitialized
location will be placed on the location chain. Adjustment of the
- breakpoint may cause read_memory_nobpt() to be called and we do
+ breakpoint may cause target_read_memory() to be called and we do
not want its scan of the location chain to find a breakpoint and
location that's only been partially initialized. */
adjusted_address = adjust_breakpoint_address (sal.pc, bptype);
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.66
diff -u -p -r1.66 breakpoint.h
--- breakpoint.h 3 Mar 2008 13:24:12 -0000 1.66
+++ breakpoint.h 10 Mar 2008 20:21:46 -0000
@@ -859,4 +859,9 @@ extern int deprecated_remove_raw_breakpo
target. */
int watchpoints_triggered (struct target_waitstatus *);
+/* Update BUF, which is LEN bytes read from the target address MEMADDR,
+ by replacing any memory breakpoints with their shadowed contents. */
+void breakpoint_restore_shadows (gdb_byte *buf, ULONGEST memaddr,
+ LONGEST len);
+
#endif /* !defined (BREAKPOINT_H) */
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.237
diff -u -p -r1.237 frame.c
--- frame.c 28 Feb 2008 16:24:24 -0000 1.237
+++ frame.c 10 Mar 2008 20:21:46 -0000
@@ -1691,8 +1691,8 @@ int
safe_frame_unwind_memory (struct frame_info *this_frame,
CORE_ADDR addr, gdb_byte *buf, int len)
{
- /* NOTE: read_memory_nobpt returns zero on success! */
- return !read_memory_nobpt (addr, buf, len);
+ /* NOTE: target_read_memory returns zero on success! */
+ return !target_read_memory (addr, buf, len);
}
/* Architecture method. */
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.118
diff -u -p -r1.118 frv-tdep.c
--- frv-tdep.c 11 Jan 2008 13:19:59 -0000 1.118
+++ frv-tdep.c 10 Mar 2008 20:21:46 -0000
@@ -449,7 +449,7 @@ frv_adjust_breakpoint_address (struct gd
char instr[frv_instr_size];
int status;
- status = read_memory_nobpt (addr, instr, sizeof instr);
+ status = target_read_memory (addr, instr, sizeof instr);
if (status != 0)
break;
Index: gdbcore.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbcore.h,v
retrieving revision 1.28
diff -u -p -r1.28 gdbcore.h
--- gdbcore.h 1 Jan 2008 22:53:10 -0000 1.28
+++ gdbcore.h 10 Mar 2008 20:21:46 -0000
@@ -39,18 +39,6 @@ extern char *get_exec_file (int err);
extern int have_core_file_p (void);
-/* Read "memory data" from whatever target or inferior we have.
- Returns zero if successful, errno value if not. EIO is used for
- address out of bounds. If breakpoints are inserted, returns shadow
- contents, not the breakpoints themselves. From breakpoint.c. */
-
-/* NOTE: cagney/2004-06-10: Code reading from a live inferior can use
- the get_frame_memory methods, code reading from an exec can use the
- target methods. */
-
-extern int read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr,
- unsigned len);
-
/* Report a memory error with error(). */
extern void memory_error (int status, CORE_ADDR memaddr);
Index: hppa-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-linux-tdep.c,v
retrieving revision 1.27
diff -u -p -r1.27 hppa-linux-tdep.c
--- hppa-linux-tdep.c 18 Feb 2008 16:11:21 -0000 1.27
+++ hppa-linux-tdep.c 10 Mar 2008 20:21:46 -0000
@@ -101,7 +101,7 @@ insns_match_pattern (CORE_ADDR pc,
{
char buf[4];
- read_memory_nobpt (npc, buf, 4);
+ target_read_memory (npc, buf, 4);
insn[i] = extract_unsigned_integer (buf, 4);
if ((insn[i] & pattern[i].mask) == pattern[i].data)
npc += 4;
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.247
diff -u -p -r1.247 hppa-tdep.c
--- hppa-tdep.c 18 Feb 2008 16:11:21 -0000 1.247
+++ hppa-tdep.c 10 Mar 2008 20:21:47 -0000
@@ -545,7 +545,7 @@ hppa_in_function_epilogue_p (struct gdba
char buf[4];
int off;
- status = read_memory_nobpt (pc, buf, 4);
+ status = target_read_memory (pc, buf, 4);
if (status != 0)
return 0;
@@ -1552,7 +1552,7 @@ restart:
old_save_sp = save_sp;
old_stack_remaining = stack_remaining;
- status = read_memory_nobpt (pc, buf, 4);
+ status = target_read_memory (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
/* Yow! */
@@ -1603,7 +1603,7 @@ restart:
&& reg_num <= 26)
{
pc += 4;
- status = read_memory_nobpt (pc, buf, 4);
+ status = target_read_memory (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
@@ -1616,7 +1616,7 @@ restart:
reg_num = inst_saves_fr (inst);
save_fr &= ~(1 << reg_num);
- status = read_memory_nobpt (pc + 4, buf, 4);
+ status = target_read_memory (pc + 4, buf, 4);
next_inst = extract_unsigned_integer (buf, 4);
/* Yow! */
@@ -1647,13 +1647,13 @@ restart:
<= (gdbarch_ptr_bit (gdbarch) == 64 ? 11 : 7))
{
pc += 8;
- status = read_memory_nobpt (pc, buf, 4);
+ status = target_read_memory (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
if ((inst & 0xfc000000) != 0x34000000)
break;
- status = read_memory_nobpt (pc + 4, buf, 4);
+ status = target_read_memory (pc + 4, buf, 4);
next_inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
@@ -2857,7 +2857,7 @@ hppa_match_insns (CORE_ADDR pc, struct i
{
gdb_byte buf[HPPA_INSN_SIZE];
- read_memory_nobpt (npc, buf, HPPA_INSN_SIZE);
+ target_read_memory (npc, buf, HPPA_INSN_SIZE);
insn[i] = extract_unsigned_integer (buf, HPPA_INSN_SIZE);
if ((insn[i] & pattern[i].mask) == pattern[i].data)
npc += 4;
Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.86
diff -u -p -r1.86 i386-linux-nat.c
--- i386-linux-nat.c 1 Mar 2008 04:39:36 -0000 1.86
+++ i386-linux-nat.c 10 Mar 2008 20:21:47 -0000
@@ -770,7 +770,7 @@ i386_linux_resume (ptid_t ptid, int step
that's about to be restored, and set the trace flag there. */
/* First check if PC is at a system call. */
- if (read_memory_nobpt (pc, buf, LINUX_SYSCALL_LEN) == 0
+ if (target_read_memory (pc, buf, LINUX_SYSCALL_LEN) == 0
&& memcmp (buf, linux_syscall, LINUX_SYSCALL_LEN) == 0)
{
ULONGEST syscall;
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.250
diff -u -p -r1.250 i386-tdep.c
--- i386-tdep.c 26 Feb 2008 22:23:45 -0000 1.250
+++ i386-tdep.c 10 Mar 2008 20:21:47 -0000
@@ -352,7 +352,7 @@ i386_follow_jump (CORE_ADDR pc)
long delta = 0;
int data16 = 0;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
if (op == 0x66)
{
data16 = 1;
@@ -418,12 +418,12 @@ i386_analyze_struct_return (CORE_ADDR pc
if (current_pc <= pc)
return pc;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
if (op != 0x58) /* popl %eax */
return pc;
- read_memory_nobpt (pc + 1, buf, 4);
+ target_read_memory (pc + 1, buf, 4);
if (memcmp (buf, proto1, 3) != 0 && memcmp (buf, proto2, 4) != 0)
return pc;
@@ -462,7 +462,7 @@ i386_skip_probe (CORE_ADDR pc)
gdb_byte buf[8];
gdb_byte op;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
if (op == 0x68 || op == 0x6a)
{
@@ -549,7 +549,7 @@ i386_match_insn (CORE_ADDR pc, struct i3
struct i386_insn *insn;
gdb_byte op;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
for (insn = skip_insns; insn->len > 0; insn++)
{
@@ -562,7 +562,7 @@ i386_match_insn (CORE_ADDR pc, struct i3
gdb_assert (insn->len > 1);
gdb_assert (insn->len <= I386_MAX_INSN_LEN);
- read_memory_nobpt (pc + 1, buf, insn->len - 1);
+ target_read_memory (pc + 1, buf, insn->len - 1);
for (i = 1; i < insn->len; i++)
{
if ((buf[i - 1] & insn->mask[i]) != insn->insn[i])
@@ -640,7 +640,7 @@ i386_skip_noop (CORE_ADDR pc)
gdb_byte op;
int check = 1;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
while (check)
{
@@ -649,7 +649,7 @@ i386_skip_noop (CORE_ADDR pc)
if (op == 0x90)
{
pc += 1;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
check = 1;
}
/* Ignore no-op instruction `mov %edi, %edi'.
@@ -665,11 +665,11 @@ i386_skip_noop (CORE_ADDR pc)
else if (op == 0x8b)
{
- read_memory_nobpt (pc + 1, &op, 1);
+ target_read_memory (pc + 1, &op, 1);
if (op == 0xff)
{
pc += 2;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
check = 1;
}
}
@@ -693,7 +693,7 @@ i386_analyze_frame_setup (CORE_ADDR pc,
if (limit <= pc)
return limit;
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
if (op == 0x55) /* pushl %ebp */
{
@@ -728,7 +728,7 @@ i386_analyze_frame_setup (CORE_ADDR pc,
if (limit <= pc + skip)
return limit;
- read_memory_nobpt (pc + skip, &op, 1);
+ target_read_memory (pc + skip, &op, 1);
/* Check for `movl %esp, %ebp' -- can be written in two ways. */
switch (op)
@@ -762,7 +762,7 @@ i386_analyze_frame_setup (CORE_ADDR pc,
NOTE: You can't subtract a 16-bit immediate from a 32-bit
reg, so we don't have to worry about a data16 prefix. */
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
if (op == 0x83)
{
/* `subl' with 8-bit immediate. */
@@ -818,7 +818,7 @@ i386_analyze_register_saves (CORE_ADDR p
offset -= cache->locals;
for (i = 0; i < 8 && pc < current_pc; i++)
{
- read_memory_nobpt (pc, &op, 1);
+ target_read_memory (pc, &op, 1);
if (op < 0x50 || op > 0x57)
break;
@@ -908,7 +908,7 @@ i386_skip_prologue (struct gdbarch *gdba
for (i = 0; i < 6; i++)
{
- read_memory_nobpt (pc + i, &op, 1);
+ target_read_memory (pc + i, &op, 1);
if (pic_pat[i] != op)
break;
}
@@ -916,7 +916,7 @@ i386_skip_prologue (struct gdbarch *gdba
{
int delta = 6;
- read_memory_nobpt (pc + delta, &op, 1);
+ target_read_memory (pc + delta, &op, 1);
if (op == 0x89) /* movl %ebx, x(%ebp) */
{
@@ -929,7 +929,7 @@ i386_skip_prologue (struct gdbarch *gdba
else /* Unexpected instruction. */
delta = 0;
- read_memory_nobpt (pc + delta, &op, 1);
+ target_read_memory (pc + delta, &op, 1);
}
/* addl y,%ebx */
Index: m68klinux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68klinux-tdep.c,v
retrieving revision 1.27
diff -u -p -r1.27 m68klinux-tdep.c
--- m68klinux-tdep.c 1 Jan 2008 22:53:12 -0000 1.27
+++ m68klinux-tdep.c 10 Mar 2008 20:21:47 -0000
@@ -69,7 +69,7 @@ m68k_linux_pc_in_sigtramp (CORE_ADDR pc,
char buf[12];
unsigned long insn0, insn1, insn2;
- if (read_memory_nobpt (pc - 4, buf, sizeof (buf)))
+ if (target_read_memory (pc - 4, buf, sizeof (buf)))
return 0;
insn1 = extract_unsigned_integer (buf + 4, 4);
insn2 = extract_unsigned_integer (buf + 8, 4);
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.469
diff -u -p -r1.469 mips-tdep.c
--- mips-tdep.c 20 Feb 2008 14:34:43 -0000 1.469
+++ mips-tdep.c 10 Mar 2008 20:21:47 -0000
@@ -926,7 +926,7 @@ mips_fetch_instruction (CORE_ADDR addr)
}
else
instlen = MIPS_INSN32_SIZE;
- status = read_memory_nobpt (addr, buf, instlen);
+ status = target_read_memory (addr, buf, instlen);
if (status)
memory_error (status, addr);
return extract_unsigned_integer (buf, instlen);
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.154
diff -u -p -r1.154 mn10300-tdep.c
--- mn10300-tdep.c 5 Feb 2008 16:20:20 -0000 1.154
+++ mn10300-tdep.c 10 Mar 2008 20:21:47 -0000
@@ -620,7 +620,7 @@ mn10300_analyze_prologue (struct gdbarch
goto finish_prologue;
/* Get the next two bytes so the prologue scan can continue. */
- status = read_memory_nobpt (addr, buf, 2);
+ status = target_read_memory (addr, buf, 2);
if (status != 0)
goto finish_prologue;
}
@@ -761,7 +761,7 @@ mn10300_analyze_prologue (struct gdbarch
if (!fmov_found)
{
addr = restore_addr;
- status = read_memory_nobpt (addr, buf, 2);
+ status = target_read_memory (addr, buf, 2);
if (status != 0)
goto finish_prologue;
stack_extra_size = 0;
Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.94
diff -u -p -r1.94 ppc-linux-tdep.c
--- ppc-linux-tdep.c 20 Feb 2008 14:31:40 -0000 1.94
+++ ppc-linux-tdep.c 10 Mar 2008 20:21:47 -0000
@@ -281,12 +281,15 @@ ppc_linux_memory_remove_breakpoint (stru
int val;
int bplen;
gdb_byte old_contents[BREAKPOINT_MAX];
+ struct cleanup *cleanup;
/* Determine appropriate breakpoint contents and size for this address. */
bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen);
if (bp == NULL)
error (_("Software breakpoints not implemented for this target."));
+ /* Make sure we see the memory breakpoints. */
+ cleanup = make_show_memory_breakpoints_cleanup (1);
val = target_read_memory (addr, old_contents, bplen);
/* If our breakpoint is no longer at the address, this means that the
@@ -295,6 +298,7 @@ ppc_linux_memory_remove_breakpoint (stru
if (val == 0 && memcmp (bp, old_contents, bplen) == 0)
val = target_write_memory (addr, bp_tgt->shadow_contents, bplen);
+ do_cleanups (cleanup);
return val;
}
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.170
diff -u -p -r1.170 s390-tdep.c
--- s390-tdep.c 31 Jan 2008 15:43:32 -0000 1.170
+++ s390-tdep.c 10 Mar 2008 20:21:48 -0000
@@ -503,12 +503,12 @@ s390_readinstruction (bfd_byte instr[],
static int s390_instrlen[] = { 2, 4, 4, 6 };
int instrlen;
- if (read_memory_nobpt (at, &instr[0], 2))
+ if (target_read_memory (at, &instr[0], 2))
return -1;
instrlen = s390_instrlen[instr[0] >> 6];
if (instrlen > 2)
{
- if (read_memory_nobpt (at + 2, &instr[2], instrlen - 2))
+ if (target_read_memory (at + 2, &instr[2], instrlen - 2))
return -1;
}
return instrlen;
@@ -1132,19 +1132,19 @@ s390_in_function_epilogue_p (struct gdba
int d2;
if (word_size == 4
- && !read_memory_nobpt (pc - 4, insn, 4)
+ && !target_read_memory (pc - 4, insn, 4)
&& is_rs (insn, op_lm, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
if (word_size == 4
- && !read_memory_nobpt (pc - 6, insn, 6)
+ && !target_read_memory (pc - 6, insn, 6)
&& is_rsy (insn, op1_lmy, op2_lmy, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
if (word_size == 8
- && !read_memory_nobpt (pc - 6, insn, 6)
+ && !target_read_memory (pc - 6, insn, 6)
&& is_rsy (insn, op1_lmg, op2_lmg, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
@@ -1658,7 +1658,7 @@ s390_sigtramp_frame_sniffer (struct fram
CORE_ADDR pc = frame_pc_unwind (next_frame);
bfd_byte sigreturn[2];
- if (read_memory_nobpt (pc, sigreturn, 2))
+ if (target_read_memory (pc, sigreturn, 2))
return NULL;
if (sigreturn[0] != 0x0a /* svc */)
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.193
diff -u -p -r1.193 sparc-tdep.c
--- sparc-tdep.c 11 Jan 2008 14:43:15 -0000 1.193
+++ sparc-tdep.c 10 Mar 2008 20:21:48 -0000
@@ -99,7 +99,7 @@ sparc_fetch_instruction (CORE_ADDR pc)
int i;
/* If we can't read the instruction at PC, return zero. */
- if (read_memory_nobpt (pc, buf, sizeof (buf)))
+ if (target_read_memory (pc, buf, sizeof (buf)))
return 0;
insn = 0;
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.155
diff -u -p -r1.155 target.c
--- target.c 28 Feb 2008 16:26:17 -0000 1.155
+++ target.c 10 Mar 2008 20:21:48 -0000
@@ -39,6 +39,7 @@
#include "gdbcore.h"
#include "exceptions.h"
#include "target-descriptions.h"
+#include "gdb_stdint.h"
static void target_info (char *, int);
@@ -203,6 +204,11 @@ int attach_flag;
static int trust_readonly = 0;
+/* Nonzero if we should show true memory content including
+ memory breakpoint inserted by gdb. */
+
+static int show_memory_breakpoints = 0;
+
/* Non-zero if we want to see trace of target level stuff. */
static int targetdebug = 0;
@@ -1064,7 +1070,11 @@ memory_xfer_partial (struct target_ops *
if (res <= 0)
return -1;
else
- return res;
+ {
+ if (readbuf && !show_memory_breakpoints)
+ breakpoint_restore_shadows (readbuf, memaddr, reg_len);
+ return res;
+ }
}
/* If none of those methods found the memory we wanted, fall back
@@ -1082,22 +1092,41 @@ memory_xfer_partial (struct target_ops *
res = ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL,
readbuf, writebuf, memaddr, reg_len);
if (res > 0)
- return res;
+ break;
/* We want to continue past core files to executables, but not
past a running target's memory. */
if (ops->to_has_all_memory)
- return res;
+ break;
ops = ops->beneath;
}
while (ops != NULL);
+ if (readbuf && !show_memory_breakpoints)
+ breakpoint_restore_shadows (readbuf, memaddr, reg_len);
+
/* If we still haven't got anything, return the last error. We
give up. */
return res;
}
+static void
+restore_show_memory_breakpoints (void *arg)
+{
+ show_memory_breakpoints = (uintptr_t) arg;
+}
+
+struct cleanup *
+make_show_memory_breakpoints_cleanup (int show)
+{
+ int current = show_memory_breakpoints;
+ show_memory_breakpoints = show;
+
+ return make_cleanup (restore_show_memory_breakpoints,
+ (void *) (uintptr_t) current);
+}
+
static LONGEST
target_xfer_partial (struct target_ops *ops,
enum target_object object, const char *annex,
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.111
diff -u -p -r1.111 target.h
--- target.h 28 Feb 2008 16:26:17 -0000 1.111
+++ target.h 10 Mar 2008 20:21:48 -0000
@@ -1250,6 +1250,11 @@ extern enum target_signal target_signal_
/* Any target can call this to switch to remote protocol (in remote.c). */
extern void push_remote_target (char *name, int from_tty);
+
+/* Set the show memory breakpoints mode to show, and installs a cleanup
+ to restore it back to the current value. */
+extern struct cleanup *make_show_memory_breakpoints_cleanup (int show);
+
\f
/* Imported from machine dependent code */
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-03-10 20:43 ` Daniel Jacobowitz
@ 2008-03-10 20:57 ` Vladimir Prus
2008-03-13 12:22 ` Daniel Jacobowitz
0 siblings, 1 reply; 8+ messages in thread
From: Vladimir Prus @ 2008-03-10 20:57 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Monday 10 March 2008 23:42:42 Daniel Jacobowitz wrote:
> On Sun, Feb 24, 2008 at 05:50:39PM +0300, Vladimir Prus wrote:
> >
> > This a second attempt at making gdb always ignore
> > any memory breakpoints that are inserted and show the original
> > memory content. This patch is the immediate prerequisite for the
> > patch that makes breakpoints always inserted.
> >
> > Unlike the previous patch, there's a mechanism to:
> > 1. Control the new behaviour from command line.
>
> Do you think we need the option is useful? I think we'll want one for
> leave-breakpoints-inserted mode, which is a bigger change, but this
> patch should only affect GDB internals.
I've added the option as it might be helpful to see real
memory content, say, when diagnosing problems with gdb/stub itself.
>
> > +static void
> > +restore_show_memory_breakpoints (void *arg)
> > +{
> > + show_memory_breakpoints = (int)arg;
> > +}
>
> This will fail with -Werror on a 64-bit host.
Ah, right.
> That leaves the attached patch. Tested on x86_64-linux, no
> regressions. How's it look? I deleted read_memory_nobpt
> entirely.
I think it's good.
- Volodya
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-03-10 20:57 ` Vladimir Prus
@ 2008-03-13 12:22 ` Daniel Jacobowitz
2008-03-13 13:19 ` Vladimir Prus
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2008-03-13 12:22 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
On Mon, Mar 10, 2008 at 11:57:23PM +0300, Vladimir Prus wrote:
> > That leaves the attached patch. Tested on x86_64-linux, no
> > regressions. How's it look? I deleted read_memory_nobpt
> > entirely.
>
> I think it's good.
I've checked it in.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Try2: Ignore breakpoints when reading memory.
2008-03-13 12:22 ` Daniel Jacobowitz
@ 2008-03-13 13:19 ` Vladimir Prus
0 siblings, 0 replies; 8+ messages in thread
From: Vladimir Prus @ 2008-03-13 13:19 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Thursday 13 March 2008 15:21:39 Daniel Jacobowitz wrote:
> On Mon, Mar 10, 2008 at 11:57:23PM +0300, Vladimir Prus wrote:
> > > That leaves the attached patch. Tested on x86_64-linux, no
> > > regressions. How's it look? I deleted read_memory_nobpt
> > > entirely.
> >
> > I think it's good.
>
> I've checked it in.
Thanks!
- Volodya
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-03-13 13:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24 14:58 [RFA] Try2: Ignore breakpoints when reading memory Vladimir Prus
2008-02-24 20:08 ` Eli Zaretskii
2008-02-25 19:30 ` Michael Snyder
2008-02-26 0:53 ` Joel Brobecker
2008-03-10 20:43 ` Daniel Jacobowitz
2008-03-10 20:57 ` Vladimir Prus
2008-03-13 12:22 ` Daniel Jacobowitz
2008-03-13 13:19 ` Vladimir Prus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox