mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 00:59:15 +08:00
* dbxread.c (process_one_symbol): Handle stabs-in-som just like
stabs-in-elf. (pastab_build_psymtabs): Likewise. * hppa-tdep.c: Change all comments to reference %r3 or frame pointer rather than %r4. (frame_chain, skip_prologue, dig_rp_from_stack): Handle %r3 as the frame pointer. * config/pa/tm-hppa.h (FP_REGNUM): Define as %r3. (FIND_FRAME_SAVED_REGS): Handle %r3 as frame pointer. (CALL_DUMMY): Likewise.
This commit is contained in:
@ -1,3 +1,18 @@
|
|||||||
|
Sun Dec 26 20:44:02 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* dbxread.c (process_one_symbol): Handle stabs-in-som just like
|
||||||
|
stabs-in-elf.
|
||||||
|
(pastab_build_psymtabs): Likewise.
|
||||||
|
|
||||||
|
* hppa-tdep.c: Change all comments to reference %r3 or frame
|
||||||
|
pointer rather than %r4.
|
||||||
|
(frame_chain, skip_prologue, dig_rp_from_stack): Handle %r3 as the
|
||||||
|
frame pointer.
|
||||||
|
|
||||||
|
* config/pa/tm-hppa.h (FP_REGNUM): Define as %r3.
|
||||||
|
(FIND_FRAME_SAVED_REGS): Handle %r3 as frame pointer.
|
||||||
|
(CALL_DUMMY): Likewise.
|
||||||
|
|
||||||
Sun Dec 26 16:59:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Sun Dec 26 16:59:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* exec.c (exec_file_command): If error occurs after we have opened
|
* exec.c (exec_file_command): If error occurs after we have opened
|
||||||
|
@ -1545,7 +1545,8 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
|
|||||||
since it would be silly to do things differently from Solaris), and
|
since it would be silly to do things differently from Solaris), and
|
||||||
false for SunOS4 and other a.out file formats. */
|
false for SunOS4 and other a.out file formats. */
|
||||||
block_address_function_relative =
|
block_address_function_relative =
|
||||||
0 == strncmp (bfd_get_target (objfile->obfd), "elf", 3);
|
(0 == strncmp (bfd_get_target (objfile->obfd), "elf", 3))
|
||||||
|
|| (0 == strncmp (bfd_get_target (objfile->obfd), "som", 3));
|
||||||
|
|
||||||
if (!block_address_function_relative)
|
if (!block_address_function_relative)
|
||||||
/* N_LBRAC, N_RBRAC and N_SLINE entries are not relative to the
|
/* N_LBRAC, N_RBRAC and N_SLINE entries are not relative to the
|
||||||
@ -1634,33 +1635,38 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
|
|||||||
if (!VARIABLES_INSIDE_BLOCK(desc, processing_gcc_compilation))
|
if (!VARIABLES_INSIDE_BLOCK(desc, processing_gcc_compilation))
|
||||||
local_symbols = new->locals;
|
local_symbols = new->locals;
|
||||||
|
|
||||||
/* If this is not the outermost LBRAC...RBRAC pair in the
|
if (context_stack_depth
|
||||||
function, its local symbols preceded it, and are the ones
|
> !VARIABLES_INSIDE_BLOCK(desc, processing_gcc_compilation))
|
||||||
just recovered from the context stack. Defined the block for them.
|
|
||||||
|
|
||||||
If this is the outermost LBRAC...RBRAC pair, there is no
|
|
||||||
need to do anything; leave the symbols that preceded it
|
|
||||||
to be attached to the function's own block. However, if
|
|
||||||
it is so, we need to indicate that we just moved outside
|
|
||||||
of the function. */
|
|
||||||
if (local_symbols
|
|
||||||
&& (context_stack_depth
|
|
||||||
> !VARIABLES_INSIDE_BLOCK(desc, processing_gcc_compilation)))
|
|
||||||
{
|
{
|
||||||
/* FIXME Muzzle a compiler bug that makes end < start. */
|
/* This is not the outermost LBRAC...RBRAC pair in the function,
|
||||||
if (new->start_addr > valu)
|
its local symbols preceded it, and are the ones just recovered
|
||||||
|
from the context stack. Define the block for them (but don't
|
||||||
|
bother if the block contains no symbols. Should we complain
|
||||||
|
on blocks without symbols? I can't think of any useful purpose
|
||||||
|
for them). */
|
||||||
|
if (local_symbols != NULL)
|
||||||
{
|
{
|
||||||
complain (&lbrac_rbrac_complaint);
|
/* Muzzle a compiler bug that makes end < start. (which
|
||||||
new->start_addr = valu;
|
compilers? Is this ever harmful?). */
|
||||||
|
if (new->start_addr > valu)
|
||||||
|
{
|
||||||
|
complain (&lbrac_rbrac_complaint);
|
||||||
|
new->start_addr = valu;
|
||||||
|
}
|
||||||
|
/* Make a block for the local symbols within. */
|
||||||
|
finish_block (0, &local_symbols, new->old_blocks,
|
||||||
|
new->start_addr, valu, objfile);
|
||||||
}
|
}
|
||||||
/* Make a block for the local symbols within. */
|
|
||||||
finish_block (0, &local_symbols, new->old_blocks,
|
|
||||||
new->start_addr, valu, objfile);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* This is the outermost LBRAC...RBRAC pair. There is no
|
||||||
|
need to do anything; leave the symbols that preceded it
|
||||||
|
to be attached to the function's own block. We need to
|
||||||
|
indicate that we just moved outside of the function. */
|
||||||
within_function = 0;
|
within_function = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VARIABLES_INSIDE_BLOCK(desc, processing_gcc_compilation))
|
if (VARIABLES_INSIDE_BLOCK(desc, processing_gcc_compilation))
|
||||||
/* Now pop locals of block just finished. */
|
/* Now pop locals of block just finished. */
|
||||||
local_symbols = new->locals;
|
local_symbols = new->locals;
|
||||||
@ -2157,6 +2163,9 @@ pastab_build_psymtabs (objfile, section_offsets, mainline)
|
|||||||
free_header_files ();
|
free_header_files ();
|
||||||
init_header_files ();
|
init_header_files ();
|
||||||
|
|
||||||
|
/* This is needed to debug objects assembled with gas2. */
|
||||||
|
processing_acc_compilation = 1;
|
||||||
|
|
||||||
/* In a PA file, we've already installed the minimal symbols that came
|
/* In a PA file, we've already installed the minimal symbols that came
|
||||||
from the PA (non-stab) symbol table, so always act like an
|
from the PA (non-stab) symbol table, so always act like an
|
||||||
incremental load here. */
|
incremental load here. */
|
||||||
|
@ -580,12 +580,12 @@ frame_chain (frame)
|
|||||||
several areas on the stack.
|
several areas on the stack.
|
||||||
|
|
||||||
Walk from the current frame to the innermost frame examining
|
Walk from the current frame to the innermost frame examining
|
||||||
unwind descriptors to determine if %r4 ever gets saved into the
|
unwind descriptors to determine if %r3 ever gets saved into the
|
||||||
stack. If so return whatever value got saved into the stack.
|
stack. If so return whatever value got saved into the stack.
|
||||||
If it was never saved in the stack, then the value in %r4 is still
|
If it was never saved in the stack, then the value in %r3 is still
|
||||||
valid, so use it.
|
valid, so use it.
|
||||||
|
|
||||||
We use information from unwind descriptors to determine if %r4
|
We use information from unwind descriptors to determine if %r3
|
||||||
is saved into the stack (Entry_GR field has this information). */
|
is saved into the stack (Entry_GR field has this information). */
|
||||||
|
|
||||||
while (frame)
|
while (frame)
|
||||||
@ -603,8 +603,8 @@ frame_chain (frame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Entry_GR specifies the number of callee-saved general registers
|
/* Entry_GR specifies the number of callee-saved general registers
|
||||||
saved in the stack. It starts at %r3, so %r4 would be 2. */
|
saved in the stack. It starts at %r3, so %r3 would be 1. */
|
||||||
if (u->Entry_GR >= 2 || u->Save_SP)
|
if (u->Entry_GR >= 1 || u->Save_SP)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
frame = frame->next;
|
frame = frame->next;
|
||||||
@ -616,15 +616,15 @@ frame_chain (frame)
|
|||||||
pointer. */
|
pointer. */
|
||||||
if (u->Save_SP)
|
if (u->Save_SP)
|
||||||
return read_memory_integer (frame->frame, 4);
|
return read_memory_integer (frame->frame, 4);
|
||||||
/* %r4 was saved somewhere in the stack. Dig it out. */
|
/* %r3 was saved somewhere in the stack. Dig it out. */
|
||||||
else
|
else
|
||||||
return dig_fp_from_stack (frame, u);
|
return dig_fp_from_stack (frame, u);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The value in %r4 was never saved into the stack (thus %r4 still
|
/* The value in %r3 was never saved into the stack (thus %r3 still
|
||||||
holds the value of the previous frame pointer). */
|
holds the value of the previous frame pointer). */
|
||||||
return read_register (4);
|
return read_register (FP_REGNUM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,14 +639,14 @@ dig_fp_from_stack (frame, u)
|
|||||||
{
|
{
|
||||||
CORE_ADDR pc = u->region_start;
|
CORE_ADDR pc = u->region_start;
|
||||||
|
|
||||||
/* Search the function for the save of %r4. */
|
/* Search the function for the save of %r3. */
|
||||||
while (pc != u->region_end)
|
while (pc != u->region_end)
|
||||||
{
|
{
|
||||||
char buf[4];
|
char buf[4];
|
||||||
unsigned long inst;
|
unsigned long inst;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
/* We need only look for the standard stw %r4,X(%sp) instruction,
|
/* We need only look for the standard stw %r3,X(%sp) instruction,
|
||||||
the other variants (eg stwm) are only used on the first register
|
the other variants (eg stwm) are only used on the first register
|
||||||
save (eg %r3). */
|
save (eg %r3). */
|
||||||
status = target_read_memory (pc, buf, 4);
|
status = target_read_memory (pc, buf, 4);
|
||||||
@ -655,10 +655,10 @@ dig_fp_from_stack (frame, u)
|
|||||||
if (status != 0)
|
if (status != 0)
|
||||||
memory_error (status, pc);
|
memory_error (status, pc);
|
||||||
|
|
||||||
/* Check for stw %r4,X(%sp). */
|
/* Check for stw %r3,X(%sp). */
|
||||||
if ((inst & 0xffffc000) == 0x6bc40000)
|
if ((inst & 0xffffc000) == 0x6bc30000)
|
||||||
{
|
{
|
||||||
/* Found the instruction which saves %r4. The offset (relative
|
/* Found the instruction which saves %r3. The offset (relative
|
||||||
to this frame) is framesize + immed14 (derived from the
|
to this frame) is framesize + immed14 (derived from the
|
||||||
store instruction). */
|
store instruction). */
|
||||||
int offset = (u->Total_frame_size << 3) + extract_14 (inst);
|
int offset = (u->Total_frame_size << 3) + extract_14 (inst);
|
||||||
@ -670,7 +670,7 @@ dig_fp_from_stack (frame, u)
|
|||||||
pc += 4;
|
pc += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
warning ("Unable to find %%r4 in stack.\n");
|
warning ("Unable to find %%r3 in stack.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1223,14 +1223,14 @@ skip_prologue(pc)
|
|||||||
|
|
||||||
if (inst == 0x6BC23FD9) /* stw rp,-20(sp) */
|
if (inst == 0x6BC23FD9) /* stw rp,-20(sp) */
|
||||||
{
|
{
|
||||||
if (read_memory_integer (pc + 4, 4) == 0x8040241) /* copy r4,r1 */
|
if (read_memory_integer (pc + 4, 4) == 0x8030241) /* copy r3,r1 */
|
||||||
pc += 16;
|
pc += 16;
|
||||||
else if ((read_memory_integer (pc + 4, 4) & ~MASK_14) == 0x68810000) /* stw r1,(r4) */
|
else if ((read_memory_integer (pc + 4, 4) & ~MASK_14) == 0x68710000) /* stw r1,(r3) */
|
||||||
pc += 8;
|
pc += 8;
|
||||||
}
|
}
|
||||||
else if (read_memory_integer (pc, 4) == 0x8040241) /* copy r4,r1 */
|
else if (read_memory_integer (pc, 4) == 0x8030241) /* copy r3,r1 */
|
||||||
pc += 12;
|
pc += 12;
|
||||||
else if ((read_memory_integer (pc, 4) & ~MASK_14) == 0x68810000) /* stw r1,(r4) */
|
else if ((read_memory_integer (pc, 4) & ~MASK_14) == 0x68710000) /* stw r1,(r3) */
|
||||||
pc += 4;
|
pc += 4;
|
||||||
|
|
||||||
return pc;
|
return pc;
|
||||||
|
Reference in New Issue
Block a user