This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 29/348] Fix -Wsahdow warnings
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 22 Nov 2011 20:22:43 +0700
- Subject: [PATCH 29/348] Fix -Wsahdow warnings
>From 681c66d2ae79af76bb4875f7fe6248297449197e Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Tue, 22 Nov 2011 17:49:13 +0700
Subject: [PATCH 29/39] Fix -Wshadow warnings.
* breakpoint.c (bp_loc_is_permanent): Fix -Wshadow
warnings.
---
gdb/ChangeLog | 5 +++++
gdb/breakpoint.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 82d81d4..2ff6715 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * breakpoint.c (bp_loc_is_permanent): Fix -Wshadow
+ warnings.
+
+2011-11-22 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* breakpoint.c (insert_breakpoint_locations): Fix -Wshadow
warnings.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 46fe9dd..184a846 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7136,7 +7136,7 @@ bp_loc_is_permanent (struct bp_location *loc)
{
int len;
CORE_ADDR addr;
- const gdb_byte *brk;
+ const gdb_byte *bpoint;
gdb_byte *target_mem;
struct cleanup *cleanup;
int retval = 0;
@@ -7144,10 +7144,10 @@ bp_loc_is_permanent (struct bp_location *loc)
gdb_assert (loc != NULL);
addr = loc->address;
- brk = gdbarch_breakpoint_from_pc (loc->gdbarch, &addr, &len);
+ bpoint = gdbarch_breakpoint_from_pc (loc->gdbarch, &addr, &len);
/* Software breakpoints unsupported? */
- if (brk == NULL)
+ if (bpoint == NULL)
return 0;
target_mem = alloca (len);
@@ -7161,7 +7161,7 @@ bp_loc_is_permanent (struct bp_location *loc)
make_show_memory_breakpoints_cleanup (0);
if (target_read_memory (loc->address, target_mem, len) == 0
- && memcmp (target_mem, brk, len) == 0)
+ && memcmp (target_mem, bpoint, len) == 0)
retval = 1;
do_cleanups (cleanup);
--
1.7.5.4