* [RFA] undeprecate deprecated_read_memory_nobpt
@ 2006-07-27 1:11 Joel Brobecker
2006-07-27 9:37 ` Mark Kettenis
2006-08-08 21:37 ` Joel Brobecker
0 siblings, 2 replies; 4+ messages in thread
From: Joel Brobecker @ 2006-07-27 1:11 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
Hello,
Following a discussion that started in:
http://www.sourceware.org/ml/gdb-patches/2006-04/msg00345.html
And then was followed up a patch proposal at:
http://www.sourceware.org/ml/gdb-patches/2006-04/msg00367.html
It was decided to undeprecate the deprecated_read_memory_nobpt function.
The following patch makes that change. The change itself was done
mechanically with perl.
* gdbcore.h (read_memory_nobpt): New function name instead of
deprecated_read_memory_nobpt.
* breakpoint.c (read_memory_nobpt): New function name instead
of deprecated_read_memory_nobpt.
Adjust calls to old deprecated_read_memory_nobpt accordingly.
* alpha-tdep.c: Adjust calls to deprecated_read_memory_nobpt
accordingly.
* alphanbsd-tdep.c: Likewise.
* frame.c: Likewise.
* frv-tdep.c: Likewise.
* hppa-linux-tdep.c: Likewise.
* hppa-tdep.c: Likewise.
* i386-linux-nat.c: Likewise.
* m68klinux-tdep.c: Likewise.
* mips-tdep.c: Likewise.
* s390-tdep.c: Likewise.
Built and tested on x86-linux. No regression. This is the first step
for another i386 patch that I will submit shortly.
OK to apply?
Thanks,
--
Joel
[-- Attachment #2: undeprecate.diff --]
[-- Type: text/plain, Size: 11509 bytes --]
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.155
diff -u -p -r1.155 alpha-tdep.c
--- alpha-tdep.c 10 Jul 2006 15:28:02 -0000 1.155
+++ alpha-tdep.c 27 Jul 2006 00:27:24 -0000
@@ -644,7 +644,7 @@ alpha_read_insn (CORE_ADDR pc)
char buf[4];
int status;
- status = deprecated_read_memory_nobpt (pc, buf, 4);
+ status = read_memory_nobpt (pc, buf, 4);
if (status)
memory_error (status, pc);
return extract_unsigned_integer (buf, 4);
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.227
diff -u -p -r1.227 breakpoint.c
--- breakpoint.c 2 Jun 2006 03:43:18 -0000 1.227
+++ breakpoint.c 27 Jul 2006 00:27:30 -0000
@@ -639,7 +639,7 @@ commands_command (char *arg, int from_tt
shadow contents, not the breakpoints themselves. From breakpoint.c. */
int
-deprecated_read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr,
+read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr,
unsigned len)
{
int status;
@@ -702,7 +702,7 @@ deprecated_read_memory_nobpt (CORE_ADDR
if (bp_addr > memaddr)
{
/* Copy the section of memory before the breakpoint. */
- status = deprecated_read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
+ status = read_memory_nobpt (memaddr, myaddr, bp_addr - memaddr);
if (status != 0)
return status;
}
@@ -710,7 +710,7 @@ deprecated_read_memory_nobpt (CORE_ADDR
if (bp_addr + bp_size < memaddr + len)
{
/* Copy the section of memory after the breakpoint. */
- status = deprecated_read_memory_nobpt (bp_addr + bp_size,
+ status = read_memory_nobpt (bp_addr + bp_size,
myaddr + bp_addr + bp_size - memaddr,
memaddr + len - (bp_addr + bp_size));
if (status != 0)
Index: alphanbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alphanbsd-tdep.c,v
retrieving revision 1.32
diff -u -p -r1.32 alphanbsd-tdep.c
--- alphanbsd-tdep.c 10 Jul 2006 19:40:27 -0000 1.32
+++ alphanbsd-tdep.c 27 Jul 2006 00:27:24 -0000
@@ -217,7 +217,7 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
LONGEST off;
int i;
- if (deprecated_read_memory_nobpt (pc, (char *) w, 4) != 0)
+ if (read_memory_nobpt (pc, (char *) w, 4) != 0)
return -1;
for (i = 0; i < RETCODE_NWORDS; i++)
@@ -231,7 +231,7 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
off = i * 4;
pc -= off;
- if (deprecated_read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
+ if (read_memory_nobpt (pc, (char *) ret, sizeof (ret)) != 0)
return -1;
if (memcmp (ret, sigtramp_retcode, RETCODE_SIZE) == 0)
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.211
diff -u -p -r1.211 frame.c
--- frame.c 17 Dec 2005 22:33:59 -0000 1.211
+++ frame.c 27 Jul 2006 00:27:54 -0000
@@ -1514,8 +1514,8 @@ int
safe_frame_unwind_memory (struct frame_info *this_frame,
CORE_ADDR addr, gdb_byte *buf, int len)
{
- /* NOTE: deprecated_read_memory_nobpt returns zero on success! */
- return !deprecated_read_memory_nobpt (addr, buf, len);
+ /* NOTE: read_memory_nobpt returns zero on success! */
+ return !read_memory_nobpt (addr, buf, len);
}
/* Architecture method. */
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.97
diff -u -p -r1.97 frv-tdep.c
--- frv-tdep.c 17 Dec 2005 22:33:59 -0000 1.97
+++ frv-tdep.c 27 Jul 2006 00:27:55 -0000
@@ -457,7 +457,7 @@ frv_gdbarch_adjust_breakpoint_address (s
char instr[frv_instr_size];
int status;
- status = deprecated_read_memory_nobpt (addr, instr, sizeof instr);
+ status = read_memory_nobpt (addr, instr, sizeof instr);
if (status != 0)
break;
Index: gdbcore.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbcore.h,v
retrieving revision 1.21
diff -u -p -r1.21 gdbcore.h
--- gdbcore.h 24 Jul 2006 20:38:07 -0000 1.21
+++ gdbcore.h 27 Jul 2006 00:27:59 -0000
@@ -49,7 +49,7 @@ extern int have_core_file_p (void);
the get_frame_memory methods, code reading from an exec can use the
target methods. */
-extern int deprecated_read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr,
+extern int read_memory_nobpt (CORE_ADDR memaddr, gdb_byte *myaddr,
unsigned len);
/* Report a memory error with error(). */
Index: hppa-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-linux-tdep.c,v
retrieving revision 1.19
diff -u -p -r1.19 hppa-linux-tdep.c
--- hppa-linux-tdep.c 30 Mar 2006 14:27:44 -0000 1.19
+++ hppa-linux-tdep.c 27 Jul 2006 00:28:03 -0000
@@ -102,7 +102,7 @@ insns_match_pattern (CORE_ADDR pc,
{
char buf[4];
- deprecated_read_memory_nobpt (npc, buf, 4);
+ read_memory_nobpt (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.222
diff -u -p -r1.222 hppa-tdep.c
--- hppa-tdep.c 30 Mar 2006 14:15:00 -0000 1.222
+++ hppa-tdep.c 27 Jul 2006 00:28:04 -0000
@@ -549,7 +549,7 @@ hppa_in_function_epilogue_p (struct gdba
char buf[4];
int off;
- status = deprecated_read_memory_nobpt (pc, buf, 4);
+ status = read_memory_nobpt (pc, buf, 4);
if (status != 0)
return 0;
@@ -1555,7 +1555,7 @@ restart:
old_save_sp = save_sp;
old_stack_remaining = stack_remaining;
- status = deprecated_read_memory_nobpt (pc, buf, 4);
+ status = read_memory_nobpt (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
/* Yow! */
@@ -1604,7 +1604,7 @@ restart:
while (reg_num >= (TARGET_PTR_BIT == 64 ? 19 : 23) && reg_num <= 26)
{
pc += 4;
- status = deprecated_read_memory_nobpt (pc, buf, 4);
+ status = read_memory_nobpt (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
@@ -1617,7 +1617,7 @@ restart:
reg_num = inst_saves_fr (inst);
save_fr &= ~(1 << reg_num);
- status = deprecated_read_memory_nobpt (pc + 4, buf, 4);
+ status = read_memory_nobpt (pc + 4, buf, 4);
next_inst = extract_unsigned_integer (buf, 4);
/* Yow! */
@@ -1644,13 +1644,13 @@ restart:
while (reg_num >= 4 && reg_num <= (TARGET_PTR_BIT == 64 ? 11 : 7))
{
pc += 8;
- status = deprecated_read_memory_nobpt (pc, buf, 4);
+ status = read_memory_nobpt (pc, buf, 4);
inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
if ((inst & 0xfc000000) != 0x34000000)
break;
- status = deprecated_read_memory_nobpt (pc + 4, buf, 4);
+ status = read_memory_nobpt (pc + 4, buf, 4);
next_inst = extract_unsigned_integer (buf, 4);
if (status != 0)
return pc;
@@ -2855,7 +2855,7 @@ hppa_match_insns (CORE_ADDR pc, struct i
{
gdb_byte buf[HPPA_INSN_SIZE];
- deprecated_read_memory_nobpt (npc, buf, HPPA_INSN_SIZE);
+ read_memory_nobpt (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.69
diff -u -p -r1.69 i386-linux-nat.c
--- i386-linux-nat.c 24 Mar 2006 23:08:16 -0000 1.69
+++ i386-linux-nat.c 27 Jul 2006 00:28:06 -0000
@@ -785,7 +785,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 (deprecated_read_memory_nobpt (pc, buf, LINUX_SYSCALL_LEN) == 0
+ if (read_memory_nobpt (pc, buf, LINUX_SYSCALL_LEN) == 0
&& memcmp (buf, linux_syscall, LINUX_SYSCALL_LEN) == 0)
{
int syscall = read_register_pid (LINUX_SYSCALL_REGNUM,
Index: m68klinux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68klinux-tdep.c,v
retrieving revision 1.19
diff -u -p -r1.19 m68klinux-tdep.c
--- m68klinux-tdep.c 18 Jun 2006 05:53:51 -0000 1.19
+++ m68klinux-tdep.c 27 Jul 2006 00:28:20 -0000
@@ -68,7 +68,7 @@ m68k_linux_pc_in_sigtramp (CORE_ADDR pc,
char buf[12];
unsigned long insn0, insn1, insn2;
- if (deprecated_read_memory_nobpt (pc - 4, buf, sizeof (buf)))
+ if (read_memory_nobpt (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.397
diff -u -p -r1.397 mips-tdep.c
--- mips-tdep.c 13 Jul 2006 13:14:54 -0000 1.397
+++ mips-tdep.c 27 Jul 2006 00:28:25 -0000
@@ -858,7 +858,7 @@ mips_fetch_instruction (CORE_ADDR addr)
}
else
instlen = MIPS_INSN32_SIZE;
- status = deprecated_read_memory_nobpt (addr, buf, instlen);
+ status = read_memory_nobpt (addr, buf, instlen);
if (status)
memory_error (status, addr);
return extract_unsigned_integer (buf, instlen);
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.154
diff -u -p -r1.154 s390-tdep.c
--- s390-tdep.c 6 May 2006 01:12:11 -0000 1.154
+++ s390-tdep.c 27 Jul 2006 00:28:42 -0000
@@ -567,12 +567,12 @@ s390_readinstruction (bfd_byte instr[],
static int s390_instrlen[] = { 2, 4, 4, 6 };
int instrlen;
- if (deprecated_read_memory_nobpt (at, &instr[0], 2))
+ if (read_memory_nobpt (at, &instr[0], 2))
return -1;
instrlen = s390_instrlen[instr[0] >> 6];
if (instrlen > 2)
{
- if (deprecated_read_memory_nobpt (at + 2, &instr[2], instrlen - 2))
+ if (read_memory_nobpt (at + 2, &instr[2], instrlen - 2))
return -1;
}
return instrlen;
@@ -1196,19 +1196,19 @@ s390_in_function_epilogue_p (struct gdba
int d2;
if (word_size == 4
- && !deprecated_read_memory_nobpt (pc - 4, insn, 4)
+ && !read_memory_nobpt (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
- && !deprecated_read_memory_nobpt (pc - 6, insn, 6)
+ && !read_memory_nobpt (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
- && !deprecated_read_memory_nobpt (pc - 6, insn, 6)
+ && !read_memory_nobpt (pc - 6, insn, 6)
&& is_rsy (insn, op1_lmg, op2_lmg, &r1, &r3, &d2, &b2)
&& r3 == S390_SP_REGNUM - S390_R0_REGNUM)
return 1;
@@ -1721,7 +1721,7 @@ s390_sigtramp_frame_sniffer (struct fram
CORE_ADDR pc = frame_pc_unwind (next_frame);
bfd_byte sigreturn[2];
- if (deprecated_read_memory_nobpt (pc, sigreturn, 2))
+ if (read_memory_nobpt (pc, sigreturn, 2))
return NULL;
if (sigreturn[0] != 0x0a /* svc */)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] undeprecate deprecated_read_memory_nobpt
2006-07-27 1:11 [RFA] undeprecate deprecated_read_memory_nobpt Joel Brobecker
@ 2006-07-27 9:37 ` Mark Kettenis
2006-07-27 13:37 ` Daniel Jacobowitz
2006-08-08 21:37 ` Joel Brobecker
1 sibling, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2006-07-27 9:37 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> The following patch makes that change. The change itself was done
> mechanically with perl.
Please fix the indentation problems caused by this before you commit it.
> * gdbcore.h (read_memory_nobpt): New function name instead of
> deprecated_read_memory_nobpt.
> * breakpoint.c (read_memory_nobpt): New function name instead
> of deprecated_read_memory_nobpt.
> Adjust calls to old deprecated_read_memory_nobpt accordingly.
> * alpha-tdep.c: Adjust calls to deprecated_read_memory_nobpt
> accordingly.
> * alphanbsd-tdep.c: Likewise.
> * frame.c: Likewise.
> * frv-tdep.c: Likewise.
> * hppa-linux-tdep.c: Likewise.
> * hppa-tdep.c: Likewise.
> * i386-linux-nat.c: Likewise.
> * m68klinux-tdep.c: Likewise.
> * mips-tdep.c: Likewise.
> * s390-tdep.c: Likewise.
ok with me, but give it a few days to give people a last chance to object.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] undeprecate deprecated_read_memory_nobpt
2006-07-27 9:37 ` Mark Kettenis
@ 2006-07-27 13:37 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-07-27 13:37 UTC (permalink / raw)
To: Mark Kettenis; +Cc: Joel Brobecker, gdb-patches
On Thu, Jul 27, 2006 at 11:36:25AM +0200, Mark Kettenis wrote:
> > The following patch makes that change. The change itself was done
> > mechanically with perl.
>
> Please fix the indentation problems caused by this before you commit it.
Seconded.
> ok with me, but give it a few days to give people a last chance to object.
Fine by me!
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] undeprecate deprecated_read_memory_nobpt
2006-07-27 1:11 [RFA] undeprecate deprecated_read_memory_nobpt Joel Brobecker
2006-07-27 9:37 ` Mark Kettenis
@ 2006-08-08 21:37 ` Joel Brobecker
1 sibling, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2006-08-08 21:37 UTC (permalink / raw)
To: gdb-patches
> * gdbcore.h (read_memory_nobpt): New function name instead of
> deprecated_read_memory_nobpt.
> * breakpoint.c (read_memory_nobpt): New function name instead
> of deprecated_read_memory_nobpt.
> Adjust calls to old deprecated_read_memory_nobpt accordingly.
> * alpha-tdep.c: Adjust calls to deprecated_read_memory_nobpt
> accordingly.
> * alphanbsd-tdep.c: Likewise.
> * frame.c: Likewise.
> * frv-tdep.c: Likewise.
> * hppa-linux-tdep.c: Likewise.
> * hppa-tdep.c: Likewise.
> * i386-linux-nat.c: Likewise.
> * m68klinux-tdep.c: Likewise.
> * mips-tdep.c: Likewise.
> * s390-tdep.c: Likewise.
I just checked this change in, whith the indentation issues fixed.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-08 21:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27 1:11 [RFA] undeprecate deprecated_read_memory_nobpt Joel Brobecker
2006-07-27 9:37 ` Mark Kettenis
2006-07-27 13:37 ` Daniel Jacobowitz
2006-08-08 21:37 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox