diff options
author | Wei-cheng Wang <cole945@gmail.com> | 2015-01-19 23:34:07 +0800 |
---|---|---|
committer | Wei-cheng Wang <cole945@gmail.com> | 2015-01-21 23:38:09 +0800 |
commit | ddeca1dffbe346eea03b893bf3c5bc46e4439e93 (patch) | |
tree | 2d627a297d094454ea1c0b5599ed973685863d2b /gdb/ppc-linux-tdep.c | |
parent | 6c1965f995bc8119c0775f2f9b648a1902e6e210 (diff) | |
download | gdb-ddeca1dffbe346eea03b893bf3c5bc46e4439e93.zip gdb-ddeca1dffbe346eea03b893bf3c5bc46e4439e93.tar.gz gdb-ddeca1dffbe346eea03b893bf3c5bc46e4439e93.tar.bz2 |
Add missing comments in rs6000-tdep.c, ppc64-tdep.c and ppc-linux-tdep.c.
gdb/ChangeLog:
* ppc-linux-tdep.c (ppc_skip_trampoline_code,
ppc_canonicalize_syscall, ppc_linux_syscall_record,
ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments.
* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
* rs6000-tdep.c (rs6000_epilogue_frame_cache,
rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4,
ppc_process_record_op19, ppc_process_record_op31,
ppc_process_record_op59, ppc_process_record_op60,
ppc_process_record_op63): Likewise.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 13bb479..a7b1163 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -305,7 +305,12 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc) return 0; } -/* Follow PLT stub to actual routine. */ +/* Follow PLT stub to actual routine. + + When the execution direction is EXEC_REVERSE, scan backward to + check whether we are in the middle of a PLT stub. Currently, + we only look-behind at most 4 instructions (the max length of PLT + stub sequence. */ static CORE_ADDR ppc_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) @@ -791,11 +796,16 @@ ppc_linux_get_syscall_number (struct gdbarch *gdbarch, static struct linux_record_tdep ppc_linux_record_tdep; static struct linux_record_tdep ppc64_linux_record_tdep; +/* ppc_canonicalize_syscall maps from the native PowerPC Linux set of + syscall ids into a canonical set of syscall ids used by process + record. (See arch/powerpc/include/uapi/asm/unistd.h in kernel tree.) + Return -1 if this system call is not supported by process record. + Otherwise, return the syscall number for preocess reocrd of given + SYSCALL. */ + static enum gdb_syscall ppc_canonicalize_syscall (int syscall) { - /* See arch/powerpc/include/uapi/asm/unistd.h */ - if (syscall <= 165) return syscall; else if (syscall >= 167 && syscall <= 190) /* Skip query_module 166 */ @@ -821,6 +831,9 @@ ppc_canonicalize_syscall (int syscall) return -1; } +/* Record registers which might be clobbered during system call. + Return 0 if successful. */ + static int ppc_linux_syscall_record (struct regcache *regcache) { @@ -901,6 +914,9 @@ ppc_linux_syscall_record (struct regcache *regcache) return 0; } +/* Record registers which might be clobbered during signal handling. + Return 0 if successful. */ + static int ppc_linux_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal) @@ -1417,7 +1433,9 @@ static const struct frame_unwind ppu2spu_unwind = { ppu2spu_prev_arch, }; -/* Initialize linux_record_tdep if not initialized yet. */ +/* Initialize linux_record_tdep if not initialized yet. + WORDSIZE is 4 or 8 for 32- or 64-bit PowerPC Linux respectively. + Sizes of data structures are initialized accordingly. */ static void ppc_init_linux_record_tdep (struct linux_record_tdep *record_tdep, |