elf_unwind_size = bfd_section_size (objfile->obfd, elf_unwind_sec);
elf_unwind_entries = elf_unwind_size / UNWIND_ENTRY_SIZE;
}
+ else
+ {
+ elf_unwind_size = 0;
+ elf_unwind_entries = 0;
+ }
if (stub_unwind_sec)
{
/* Else use the value in %rp to set the new PC. */
else
- target_write_pc (read_register (RP_REGNUM));
+ target_write_pc (read_register (RP_REGNUM), 0);
write_register (FP_REGNUM, read_memory_integer (fp, 4));
/* Get the PC from %r31 if currently in a syscall. Also mask out privilege
bits. */
CORE_ADDR
-target_read_pc ()
+target_read_pc (pid)
+ int pid;
{
int flags = read_register (FLAGS_REGNUM);
/* Write out the PC. If currently in a syscall, then also write the new
PC value into %r31. */
void
-target_write_pc (v)
+target_write_pc (v, pid)
CORE_ADDR v;
+ int pid;
{
int flags = read_register (FLAGS_REGNUM);
{
/* Yup. See if the previous instruction loaded
a value into %r1. If so compute and return the jump address. */
- if ((prev_inst & 0xffe00000) == 0x20202000)
+ if ((prev_inst & 0xffe0e000) == 0x20202000)
return (extract_21 (prev_inst) + extract_17 (curr_inst)) & ~0x3;
else
{
}
}
- /* Does it look like bl X,rp? Another way to do a branch from the
- stub to the actual function. */
- else if ((curr_inst & 0xffe0e000) == 0xe8400000)
+ /* Does it look like bl X,%rp or bl X,%r0? Another way to do a
+ branch from the stub to the actual function. */
+ else if ((curr_inst & 0xffe0e000) == 0xe8400000
+ || (curr_inst & 0xffe0e000) == 0xe8000000)
return (loc + extract_17 (curr_inst) + 8) & ~0x3;
/* Does it look like bv (rp)? Note this depends on the