Current implementation of ppcfbsd_pc_in_sigtramp() seems to take only 32-bit
PowerPC in account, as on 64-bit PowerPC most kernel instruction addresses will
be wrongly reported as in sigtramp.
This change adds proper sigtramp detection for PPC64.
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D22199
Modify trapframe decoding to properly analyze trapframe.
Provide method for fixup_pc. It happens, that in some kernel
functions, the GDB stack frame decoder cannot determine both
func name and frame size. This is because these functions
either contain invalid instruction, or their format does
not match standard schema. Detect that scenarios and move
PC accordingly to jump into known function schema, which
GDB is able to parse.
Obtained from: Semihalf
Sponsored by: Juniper Networks
Reviewed by: kib, zbb
Differential Revision: https://reviews.freebsd.org/D5976
To make KGDB working, it needs to understand kernel ELF image.
By default it is compiled using EABI_5, which is not supported
on the gdb-6. As a workaround, treat these images as EABI_2 because
they share a lot of things in common.
This workaround does not guarantee ALL funtionalities
to work.
Submitted by: Wojciech Macek <wma@semihalf.com>
Reviewed by: jhb
Obtained from: Semihalf
Sponsored by: Juniper Networks Inc.
Differential Revision: https://reviews.freebsd.org/D4012
GDB: Replace use of sprintf.
2005-03-17 Mark Kettenis <kettenis@gnu.org>
* corelow.c (get_core_register_section): Replace usage of sprintf
and strcpy with xstrprintf and xstrdup.
Sourceware commit: 3ecda4574edb38ad12fb491ccaf6d9b0caa3a07a
CID: 1006819
MFC after: 4 days
location for the native amd64 ABI. This fixes unwinding over the
signal frame after trampoline was moved to the shared page.
The code would be more correct if using sysctl for the target process
instead of inspecting gdb' own trampoline, but the current change is
least intrusive and currently, we always initialize the native ABI
sysvec first, which means that trampoline location for FreeBSD/amd64
ABI is relatively stable.
Similar change will benefit libunwind.
Analyzed by: avg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
2011-11-14 Jim Ingham <jingham@apple.com>
* dwarf2read.c (read_type_die): Handle DW_TAG_unspecified_type.
(read_tag_unspecified_type): New function, add a type for the
DW_TAG_unspecified_type die.
Obtained from: Apple, gdb-1752
.note.ABI-tag section.
This helps on ARM EABI where the OS/ABI field is zero. It would be better
to use the NOTES program header however this would require a more invasive
change.
This improves GDB usability when debugging code compiled with
optimization.
Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior
to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded
inline.
| 2004-12-12 Andrew Cagney <cagney@gnu.org>
|
| * frame.c (get_prev_frame): When unwinding normal frames, check
| that the PC isn't zero.
Sponsored by: ADARA Networks
MFC After: 1 month
64-bit PowerPC or 32-bit PowerPC.
- Make gdb work on powerpc64, the code for this is obtained from
ppc-linux-tdep.c.
- Remove non-elf core read functionality. Implement core read functionality
similar like other FreeBSD targets.
- Set long double limitations.
x86 CPU support, better support for powerpc64, some new directives, and
many other things. Bump __FreeBSD_version, and add a note to UPDATING.
Thanks to the many people that have helped to test this.
Obtained from: projects/binutils-2.17
thread specific informations.
In order to do that, and in order to avoid KBI breakage with existing
infrastructure the following semantic is implemented:
- For live programs, a new member to the PT_LWPINFO is added (pl_tdname)
- For cores, a new ELF note is added (NT_THRMISC) that can be used for
storing thread specific, miscellaneous, informations. Right now it is
just popluated with a thread name.
GDB, then, retrieves the correct informations from the corefile via the
BFD interface, as it groks the ELF notes and create appropriate
pseudo-sections.
Sponsored by: Sandvine Incorporated
Tested by: gianni
Discussed with: dim, kan, kib
MFC after: 2 weeks
read_initial_length detects pointer size by checking first
4 bytes of .debug_line and stores it in struct comp_unit_head *
passed to it as second argument. By passing NULL to a
read_initial_length we ignore actual pointer size (8 bytes) and
use default (4 bytes) which results in wrong offsets of header fields.
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.
Obtained from: projects/ppc64
on mips. Its not fully done yet but its a start.
Obtained from: JC - c.jayachandran@gmail.com
M gnu/usr.bin/gdb/kgdb/trgt_mips.c
M gnu/usr.bin/gdb/arch/mips/init.c
M gnu/usr.bin/gdb/arch/mips/Makefile
M gnu/usr.bin/Makefile
M contrib/gdb/gdb/mips-tdep.h
even if some appear to have (partially) corrupted stack traces.
E.g. kernel crashdumps typically have stack weirdness at
userland-kernel boundary.
Obtained from: vendor/upstream (CVS rev 1.118 of stack.c)
Reviewed by: emaste
Approved by: jhb
This fixes a situation where GDB gives incorrect backtraces when a signal
handler is in the call chain.
Submitted by: Stu Grossman <grossman@juniper.net>