From: Pedro Alves <pedro@codesourcery.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [commit] [gdbserver/linux] access memory of running processes
Date: Fri, 27 Aug 2010 00:19:00 -0000 [thread overview]
Message-ID: <201008270119.24050.pedro@codesourcery.com> (raw)
In-Reply-To: <4C77010C.60607@vmware.com>
On Friday 27 August 2010 01:04:28, Michael Snyder wrote:
> Pedro Alves wrote:
> > On Friday 27 August 2010 00:28:56, Michael Snyder wrote:
> >> Hmmm, don't like "unprepare_to_access_memory".
> >>
> >> What about "finish_accessing_memory"?
> >
> > Hmm, I don't like "finish", since the access has finished
> > already when we call this function. How about "done_accessing_memory"?
>
> Done is good.
So done.
> > Any other suggestions/nits? :-)
>
> Yeah! I don't like "Pedro". Why don't you change it to "Pecos Pete"?
> ;-)
Sure, done. :-) Just don't ask me about the West.
--
Pecos Pete
2010-08-27 Pedro Alves <pedro@codesourcery.com>
* linux-low.c (linux_unprepare_to_access_memory): Rename to ...
(linux_done_accessing_memory): ... this.
(linux_target_ops): Adjust.
* linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
* nto-low.c (nto_target_ops): Adjust comment.
* server.c (gdb_read_memory, gdb_write_memory): Adjust.
* spu-low.c (spu_target_ops): Adjust comment.
* target.h (target_ops): Rename unprepare_to_access_memory field
to done_accessing_memory.
(unprepare_to_access_memory): Rename to ...
(done_accessing_memory): ... this.
---
gdb/gdbserver/linux-low.c | 4 ++--
gdb/gdbserver/linux-x86-low.c | 4 ++--
gdb/gdbserver/nto-low.c | 2 +-
gdb/gdbserver/server.c | 4 ++--
gdb/gdbserver/spu-low.c | 2 +-
gdb/gdbserver/target.h | 8 ++++----
gdb/gdbserver/win32-low.c | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
Index: src/gdb/gdbserver/linux-low.c
===================================================================
--- src.orig/gdb/gdbserver/linux-low.c 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/linux-low.c 2010-08-27 01:08:48.000000000 +0100
@@ -5016,7 +5016,7 @@ linux_prepare_to_access_memory (void)
}
static void
-linux_unprepare_to_access_memory (void)
+linux_done_accessing_memory (void)
{
/* Neither ptrace nor /proc/PID/mem allow accessing memory through a
running LWP. */
@@ -5063,7 +5063,7 @@ static struct target_ops linux_target_op
linux_fetch_registers,
linux_store_registers,
linux_prepare_to_access_memory,
- linux_unprepare_to_access_memory,
+ linux_done_accessing_memory,
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
Index: src/gdb/gdbserver/linux-x86-low.c
===================================================================
--- src.orig/gdb/gdbserver/linux-x86-low.c 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/linux-x86-low.c 2010-08-27 01:12:50.000000000 +0100
@@ -562,7 +562,7 @@ x86_insert_point (char type, CORE_ADDR a
if (ret)
return -1;
ret = set_gdb_breakpoint_at (addr);
- unprepare_to_access_memory ();
+ done_accessing_memory ();
return ret;
}
case '2':
@@ -590,7 +590,7 @@ x86_remove_point (char type, CORE_ADDR a
if (ret)
return -1;
ret = delete_gdb_breakpoint_at (addr);
- unprepare_to_access_memory ();
+ done_accessing_memory ();
return ret;
}
case '2':
Index: src/gdb/gdbserver/nto-low.c
===================================================================
--- src.orig/gdb/gdbserver/nto-low.c 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/nto-low.c 2010-08-27 01:10:15.000000000 +0100
@@ -914,7 +914,7 @@ static struct target_ops nto_target_ops
nto_fetch_registers,
nto_store_registers,
NULL, /* prepare_to_access_memory */
- NULL, /* unprepare_to_access_memory */
+ NULL, /* done_accessing_memory */
nto_read_memory,
nto_write_memory,
NULL, /* nto_look_up_symbols */
Index: src/gdb/gdbserver/server.c
===================================================================
--- src.orig/gdb/gdbserver/server.c 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/server.c 2010-08-27 01:10:41.000000000 +0100
@@ -564,7 +564,7 @@ gdb_read_memory (CORE_ADDR memaddr, unsi
if (ret == 0)
{
ret = read_inferior_memory (memaddr, myaddr, len);
- unprepare_to_access_memory ();
+ done_accessing_memory ();
}
return ret;
@@ -586,7 +586,7 @@ gdb_write_memory (CORE_ADDR memaddr, con
if (ret == 0)
{
ret = write_inferior_memory (memaddr, myaddr, len);
- unprepare_to_access_memory ();
+ done_accessing_memory ();
}
return ret;
}
Index: src/gdb/gdbserver/spu-low.c
===================================================================
--- src.orig/gdb/gdbserver/spu-low.c 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/spu-low.c 2010-08-27 01:10:55.000000000 +0100
@@ -654,7 +654,7 @@ static struct target_ops spu_target_ops
spu_fetch_registers,
spu_store_registers,
NULL, /* prepare_to_access_memory */
- NULL, /* unprepare_to_access_memory */
+ NULL, /* done_accessing_memory */
spu_read_memory,
spu_write_memory,
spu_look_up_symbols,
Index: src/gdb/gdbserver/target.h
===================================================================
--- src.orig/gdb/gdbserver/target.h 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/target.h 2010-08-27 01:11:25.000000000 +0100
@@ -196,7 +196,7 @@ struct target_ops
/* Undo the effects of prepare_to_access_memory. */
- void (*unprepare_to_access_memory) (void);
+ void (*done_accessing_memory) (void);
/* Read memory from the inferior process. This should generally be
called through read_inferior_memory, which handles breakpoint shadowing.
@@ -491,11 +491,11 @@ ptid_t mywait (ptid_t ptid, struct targe
? (*the_target->prepare_to_access_memory) () \
: 0)
-#define unprepare_to_access_memory() \
+#define done_accessing_memory() \
do \
{ \
- if (the_target->unprepare_to_access_memory) \
- (*the_target->unprepare_to_access_memory) (); \
+ if (the_target->done_accessing_memory) \
+ (*the_target->done_accessing_memory) (); \
} while (0)
int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len);
Index: src/gdb/gdbserver/win32-low.c
===================================================================
--- src.orig/gdb/gdbserver/win32-low.c 2010-08-27 00:15:01.000000000 +0100
+++ src/gdb/gdbserver/win32-low.c 2010-08-27 01:12:12.000000000 +0100
@@ -1782,7 +1782,7 @@ static struct target_ops win32_target_op
win32_fetch_inferior_registers,
win32_store_inferior_registers,
NULL, /* prepare_to_access_memory */
- NULL, /* unprepare_to_access_memory */
+ NULL, /* done_accessing_memory */
win32_read_inferior_memory,
win32_write_inferior_memory,
NULL, /* lookup_symbols */
prev parent reply other threads:[~2010-08-27 0:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-26 23:26 Pedro Alves
2010-08-26 23:29 ` Michael Snyder
2010-08-27 0:02 ` Pedro Alves
2010-08-27 0:04 ` Michael Snyder
2010-08-27 0:19 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201008270119.24050.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox