Reindented.

This commit is contained in:
Michal Ludvig 2002-10-24 01:37:40 +00:00
parent baed091b2b
commit b64bbf8c48
6 changed files with 41 additions and 42 deletions

View file

@ -814,13 +814,13 @@ frame_state_for (struct context *context, struct frame_state *fs)
gdb_assert (fde->cie_ptr != NULL);
cie = fde->cie_ptr;
fs->code_align = cie->code_align;
fs->data_align = cie->data_align;
fs->retaddr_column = cie->ra;
fs->addr_encoding = cie->addr_encoding;
fs->objfile = cie->objfile;
execute_cfa_program (cie->objfile, cie->data,
cie->data + cie->data_length, context, fs);
execute_cfa_program (cie->objfile, fde->data,
@ -1094,7 +1094,7 @@ execute_stack_op (struct objfile *objfile,
case DW_OP_deref_size:
{
int len = *op_ptr++;
if (len != 1 && len != 2 && len != 4 && len !=8)
if (len != 1 && len != 2 && len != 4 && len != 8)
internal_error (__FILE__, __LINE__,
"execute_stack_op error");
result = read_memory_unsigned_integer (result, len);

View file

@ -84,7 +84,7 @@ CORE_ADDR cfi_get_ra (struct frame_info *fi);
The argument RAW_BUFFER must point to aligned memory. */
void cfi_get_saved_register (char *raw_buffer,
int *optimized,
CORE_ADDR * addrp,
CORE_ADDR *addrp,
struct frame_info *frame,
int regnum, enum lval_type *lval);

View file

@ -37,7 +37,7 @@ fi
# Different indent versions give different indentation.
case `${indent} --version 2>/dev/null < /dev/null` in
GNU*2.2.6 ) ;;
GNU*2.2* ) ;;
*GNU* ) echo "Incorrect version of GNU indent" 1>&2 ;;
* ) echo "Indent is not GNU" 1>&2 ;;
esac

View file

@ -35,7 +35,7 @@
#define LINUX_SIGTRAMP_OFFSET1 (7)
static const unsigned char linux_sigtramp_code[] = {
/* mov $__NR_rt_sigreturn,%rax */
/* mov $__NR_rt_sigreturn,%rax */
LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00,
/* syscall */
LINUX_SIGTRAMP_INSN1, 0x05
@ -100,8 +100,7 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
/* This is the top frame. */
rsp = read_register (SP_REGNUM);
return rsp + LINUX_SIGINFO_SIZE +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
return rsp + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
@ -148,53 +147,51 @@ x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
{
if (name)
return STREQ ("__restore_rt", name);
return (x86_64_linux_sigtramp_start (pc) != 0);
}
CORE_ADDR
x86_64_linux_frame_chain (struct frame_info *fi)
{
ULONGEST addr;
CORE_ADDR fp, pc;
if (! fi->signal_handler_caller)
{
fp = cfi_frame_chain (fi);
if(fp)
return fp;
else
addr = fi->frame;
}
else
addr = fi->next->frame;
ULONGEST addr;
CORE_ADDR fp, pc;
addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
fp = read_memory_integer (addr + LINUX_SIGCONTEXT_FP_OFFSET, 8)+8;
if (!fi->signal_handler_caller)
{
fp = cfi_frame_chain (fi);
if (fp)
return fp;
else
addr = fi->frame;
}
else
addr = fi->next->frame;
addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
fp = read_memory_integer (addr + LINUX_SIGCONTEXT_FP_OFFSET, 8) + 8;
return fp;
}
void
x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
{
CORE_ADDR addr;
CORE_ADDR addr;
if(fi->next && fi->next->signal_handler_caller)
{
addr = fi->next->next->frame
+ LINUX_SIGINFO_SIZE
+ LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
fi->pc = read_memory_integer (addr
+ LINUX_SIGCONTEXT_PC_OFFSET, 8);
}
else
cfi_init_frame_pc (fromleaf, fi);
if (fi->next && fi->next->signal_handler_caller)
{
addr = fi->next->next->frame
+ LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
fi->pc = read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
}
else
cfi_init_frame_pc (fromleaf, fi);
}
void
x86_64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
cfi_init_extra_frame_info (fromleaf, fi);
cfi_init_extra_frame_info (fromleaf, fi);
}

View file

@ -904,7 +904,7 @@ x86_64_skip_prologue (CORE_ADDR pc)
/* Sequence of bytes for breakpoint instruction. */
static unsigned char *
x86_64_breakpoint_from_pc (CORE_ADDR * pc, int *lenptr)
x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
{
static unsigned char breakpoint[] = { 0xcc };
*lenptr = 1;
@ -1090,12 +1090,14 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
set_gdbarch_deprecated_extract_return_value (gdbarch, x86_64_extract_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch,
x86_64_extract_return_value);
/* Write into the appropriate registers a function return value stored
in VALBUF of type TYPE, given in virtual format. */
set_gdbarch_deprecated_store_return_value (gdbarch, x86_64_store_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch,
x86_64_store_return_value);
/* Offset from address of function to start of its code. */

View file

@ -30,7 +30,7 @@ extern int x86_64_num_gregs;
int x86_64_register_number (const char *name);
const char *x86_64_register_name (int reg_nr);
gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
gdbarch_pc_in_sigtramp_ftype x86_64_linux_in_sigtramp;