aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2cfi.c
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2002-05-07 11:22:54 +0000
committerMichal Ludvig <mludvig@suse.cz>2002-05-07 11:22:54 +0000
commit4657573b80193b4716f3559b3bfef32fae0f974e (patch)
tree20ec6b2f13119c0d0076bb3d7608496e0cb9c953 /gdb/dwarf2cfi.c
parent3e3f011f9342b3ae7fd2f4b0e9a1484be6a31d60 (diff)
downloadfsf-binutils-gdb-4657573b80193b4716f3559b3bfef32fae0f974e.zip
fsf-binutils-gdb-4657573b80193b4716f3559b3bfef32fae0f974e.tar.gz
fsf-binutils-gdb-4657573b80193b4716f3559b3bfef32fae0f974e.tar.bz2
2002-05-07 Michal Ludvig <mludvig@suse.cz>
* dwarf2cfi.c: Code cleanup, removed unused variables, added default labels to switch {} statements. * x86-64-tdep.c: Ditto. * x86-64-linux-nat.c: Ditto.
Diffstat (limited to 'gdb/dwarf2cfi.c')
-rw-r--r--gdb/dwarf2cfi.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index ffbeb5d..a62a1e0 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -222,8 +222,6 @@ static CORE_ADDR read_encoded_pointer (bfd *abfd, char **p,
static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
int dwarf64);
-static ULONGEST read_address (bfd *abfd, char **p);
-
static int is_cie (ULONGEST cie_id, int dwarf64);
static int compare_fde_unit (const void *a, const void *b);
@@ -280,7 +278,7 @@ static struct context *
context_alloc ()
{
struct context *context;
- struct context_reg *reg;
+
int regs_size = sizeof (struct context_reg) * NUM_REGS;
context = (struct context *) obstack_alloc (&unwind_tmp_obstack,
@@ -297,7 +295,7 @@ static struct frame_state *
frame_state_alloc ()
{
struct frame_state *fs;
- struct frame_state_reg *reg;
+
int regs_size = sizeof (struct frame_state_reg) * NUM_REGS;
fs = (struct frame_state *) obstack_alloc (&unwind_tmp_obstack,
@@ -319,7 +317,6 @@ unwind_tmp_obstack_free ()
static void
context_cpy (struct context *dst, struct context *src)
{
- struct context_reg *reg = dst->reg;
int regs_size = sizeof (struct context_reg) * NUM_REGS;
*dst = *src;
@@ -586,7 +583,6 @@ execute_cfa_program ( struct objfile *objfile, char *insn_ptr, char *insn_end,
unsigned char insn = *insn_ptr++;
ULONGEST reg, uoffset;
LONGEST offset;
- int bytes_read;
if (insn & DW_CFA_advance_loc)
fs->pc += (insn & 0x3f) * fs->code_align;
@@ -788,7 +784,6 @@ frame_state_for (struct context *context, struct frame_state *fs)
{
struct fde_unit *fde;
struct cie_unit *cie;
- unsigned char *aug, *insn, *end;
context->args_size = 0;
context->lsda = 0;
@@ -1109,6 +1104,8 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_plus_uconst:
result += read_uleb128 (objfile->obfd, &op_ptr);
break;
+ default:
+ break;
}
break;
@@ -1186,6 +1183,8 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_ne:
result = (LONGEST) first != (LONGEST) second;
break;
+ default: /* This label is here just to avoid warning. */
+ break;
}
}
break;
@@ -1255,6 +1254,8 @@ update_context (struct context *context, struct frame_state *fs, int chain)
exp + len, context, 0);
break;
}
+ default:
+ break;
}
context->cfa = cfa;
@@ -1346,7 +1347,7 @@ compare_fde_unit (const void *a, const void *b)
}
/* Build the cie_chunks and fde_chunks tables from informations
- in .debug.frame section. */
+ in .debug_frame section. */
void
dwarf2_build_frame_info (struct objfile *objfile)
{