* [patch] frame-unwind, gnu-v2-abi, cp-support, cp-namespace, trad-frame, tramp-frame.c: remove unused vars.
@ 2010-05-07 1:15 Michael Snyder
2010-05-07 17:43 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2010-05-07 1:15 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: tmp30.txt --]
[-- Type: text/plain, Size: 5034 bytes --]
2010-05-06 Michael Snyder <msnyder@vmware.com>
* frame-unwind.c (frame_unwind_find_by_frame):
Delete unused variable.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Delete unused variable.
* cp-support.c (mangled_name_to_comp): Delete unused variable.
(method_name_from_physname): Delete unused variable.
(cp_func_name): Delete unused variable.
(cp_validate_operator): Delete unused variable.
* cp-namespace.c (cp_scan_for_anonymous_namespaces):
Delete unused variable.
* trad-frame.c (trad_frame_get_prev_register):
Delete unused variable.
* tramp-frame.c (tramp_frame_cache): Delete unused variable.
Index: frame-unwind.c
===================================================================
RCS file: /cvs/src/src/gdb/frame-unwind.c,v
retrieving revision 1.28
diff -u -p -r1.28 frame-unwind.c
--- frame-unwind.c 1 Jan 2010 07:31:31 -0000 1.28
+++ frame-unwind.c 7 May 2010 01:11:20 -0000
@@ -90,11 +90,10 @@ frame_unwind_append_unwinder (struct gdb
const struct frame_unwind *
frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
{
- int i;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
struct frame_unwind_table_entry *entry;
- struct cleanup *old_cleanup;
+
for (entry = table->list; entry != NULL; entry = entry->next)
{
struct cleanup *old_cleanup;
Index: gnu-v2-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v2-abi.c,v
retrieving revision 1.36
diff -u -p -r1.36 gnu-v2-abi.c
--- gnu-v2-abi.c 2 Feb 2010 23:16:53 -0000 1.36
+++ gnu-v2-abi.c 7 May 2010 01:11:20 -0000
@@ -185,13 +185,8 @@ gnuv2_value_rtti_type (struct value *v,
{
struct type *known_type;
struct type *rtti_type;
- CORE_ADDR coreptr;
- struct value *vp;
- long top_offset = 0;
- char rtti_type_name[256];
CORE_ADDR vtbl;
struct minimal_symbol *minsym;
- struct symbol *sym;
char *demangled_name, *p;
struct type *btype;
struct type *known_type_vptr_basetype;
Index: cp-support.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-support.c,v
retrieving revision 1.37
diff -u -p -r1.37 cp-support.c
--- cp-support.c 10 Mar 2010 18:20:06 -0000 1.37
+++ cp-support.c 7 May 2010 01:11:20 -0000
@@ -158,7 +158,6 @@ mangled_name_to_comp (const char *mangle
{
struct demangle_component *ret;
char *demangled_name;
- int len;
/* If it looks like a v3 mangled name, then try to go directly
to trees. */
@@ -342,7 +341,6 @@ method_name_from_physname (const char *p
void *storage = NULL;
char *demangled_name = NULL, *ret;
struct demangle_component *ret_comp;
- int done;
ret_comp = mangled_name_to_comp (physname, DMGL_ANSI, &storage,
&demangled_name);
@@ -373,7 +371,6 @@ cp_func_name (const char *full_name)
{
char *ret;
struct demangle_component *ret_comp;
- int done;
ret_comp = cp_demangled_name_to_comp (full_name, NULL);
if (!ret_comp)
@@ -925,7 +922,6 @@ cp_validate_operator (const char *input)
struct expression *expr;
struct value *val;
struct gdb_exception except;
- struct cleanup *old_chain;
p = input;
Index: cp-namespace.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-namespace.c,v
retrieving revision 1.40
diff -u -p -r1.40 cp-namespace.c
--- cp-namespace.c 3 May 2010 20:10:22 -0000 1.40
+++ cp-namespace.c 7 May 2010 01:11:20 -0000
@@ -81,7 +81,6 @@ cp_scan_for_anonymous_namespaces (const
const char *name = SYMBOL_DEMANGLED_NAME (symbol);
unsigned int previous_component;
unsigned int next_component;
- const char *len;
/* Start with a quick-and-dirty check for mention of "(anonymous
namespace)". */
Index: trad-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/trad-frame.c,v
retrieving revision 1.20
diff -u -p -r1.20 trad-frame.c
--- trad-frame.c 1 Jan 2010 07:31:42 -0000 1.20
+++ trad-frame.c 7 May 2010 01:11:20 -0000
@@ -136,7 +136,6 @@ trad_frame_get_prev_register (struct fra
struct trad_frame_saved_reg this_saved_regs[],
int regnum)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
if (trad_frame_addr_p (this_saved_regs, regnum))
/* The register was saved in memory. */
return frame_unwind_got_memory (this_frame, regnum,
Index: tramp-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/tramp-frame.c,v
retrieving revision 1.18
diff -u -p -r1.18 tramp-frame.c
--- tramp-frame.c 1 Jan 2010 07:31:43 -0000 1.18
+++ tramp-frame.c 7 May 2010 01:11:20 -0000
@@ -44,7 +44,6 @@ static struct trad_frame_cache *
tramp_frame_cache (struct frame_info *this_frame,
void **this_cache)
{
- CORE_ADDR pc = get_frame_pc (this_frame);
struct tramp_frame_cache *tramp_cache = (*this_cache);
if (tramp_cache->trad_cache == NULL)
{
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] frame-unwind, gnu-v2-abi, cp-support, cp-namespace, trad-frame, tramp-frame.c: remove unused vars.
2010-05-07 1:15 [patch] frame-unwind, gnu-v2-abi, cp-support, cp-namespace, trad-frame, tramp-frame.c: remove unused vars Michael Snyder
@ 2010-05-07 17:43 ` Tom Tromey
2010-05-07 18:31 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2010-05-07 17:43 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Michael> - CORE_ADDR pc = get_frame_pc (this_frame);
I am not completely sure this is safe. Maybe get_frame_pc can throw an
exception.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] frame-unwind, gnu-v2-abi, cp-support, cp-namespace, trad-frame, tramp-frame.c: remove unused vars.
2010-05-07 17:43 ` Tom Tromey
@ 2010-05-07 18:31 ` Michael Snyder
0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2010-05-07 18:31 UTC (permalink / raw)
To: tromey; +Cc: gdb-patches
Tom Tromey wrote:
> Michael> - CORE_ADDR pc = get_frame_pc (this_frame);
>
> I am not completely sure this is safe. Maybe get_frame_pc can throw an
> exception.
I thought about that, but if the function call is there
solely because of some side effect it can have, that's
pretty fishy too.
I'm willing to put it back if that's what is thought best...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-07 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-07 1:15 [patch] frame-unwind, gnu-v2-abi, cp-support, cp-namespace, trad-frame, tramp-frame.c: remove unused vars Michael Snyder
2010-05-07 17:43 ` Tom Tromey
2010-05-07 18:31 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox