aboutsummaryrefslogtreecommitdiff
path: root/gdb/aarch32-tdep.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-26gdb, gdbserver, gdbsupport: remove includes of early headersSimon Marchi1-2/+0
Now that defs.h, server.h and common-defs.h are included via the `-include` option, it is no longer necessary for source files to include them. Remove all the inclusions of these files I could find. Update the generation scripts where relevant. Change-Id: Ia026cff269c1b7ae7386dd3619bc9bb6a5332837 Approved-By: Pedro Alves <pedro@palves.net>
2024-02-29gdb/arm: Remove tpidruro register from non-FreeBSD target descriptionsThiago Jung Bauermann1-5/+10
Commit 92d48a1e4eac ("Add an arm-tls feature which includes the tpidruro register from CP15.") introduced the org.gnu.gdb.arm.tls feature, which adds the tpidruro register, and unconditionally enabled it in aarch32_create_target_description. In Linux, the tpidruro register isn't available via ptrace in the 32-bit kernel but it is available for an aarch32 program running under an arm64 kernel via the ptrace compat interface. This isn't currently implemented however, which causes GDB on arm-linux with 64-bit kernel to list the register but show it as unavailable, as reported by Tom de Vries: $ gdb -q -batch a.out -ex start -ex 'p $tpidruro' Temporary breakpoint 1 at 0x512 Temporary breakpoint 1, 0xaaaaa512 in main () $1 = <unavailable> Simon Marchi then clarified: > The only time we should be seeing some "unavailable" registers or memory > is in the context of tracepoints, for things that are not collected. > Seeing an unavailable register here is a sign that something is not > right. Therefore, disable the TLS feature in aarch32 target descriptions for Linux and NetBSD targets (the latter also doesn't seem to support accessing tpidruro either, based on a quick look at arm-netbsd-nat.c). This patch fixes the following tests: Running gdb.base/inline-frame-cycle-unwind.exp ... FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 3: backtrace when the unwind is broken at frame 3 FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 5: backtrace when the unwind is broken at frame 5 FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 1: backtrace when the unwind is broken at frame 1 Tested with Ubuntu 22.04.3 on armv8l-linux-gnueabihf in native, native-gdbserver and native-extended-gdbserver targets with no regressions. PR tdep/31418 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31418 Approved-By: John Baldwin <jhb@FreeBSD.org>
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-11-26Include aarch32-tdep.h in aarch32-tdep.cSimon Marchi1-0/+3
The error below shows that aarch32-tdep.c is missing an include for aarch32-tdep.h, add it. CXX aarch32-tdep.o /home/smarchi/src/binutils-gdb/gdb/aarch32-tdep.c: In function ‘const target_desc* aarch32_read_description()’: /home/smarchi/src/binutils-gdb/gdb/aarch32-tdep.c:27:1: error: no previous declaration for ‘const target_desc* aarch32_read_description()’ [-Werror=missing-declarations] aarch32_read_description () ^~~~~~~~~~~~~~~~~~~~~~~~ Putting the include of aarch32-tdep.h early in aarch32-tdep.c gives us an error about target_desc not being defined. Indeed, aarch32-tdep.h uses target_desc without forward-declaring it or including the proper header. Add a forward-declaration for it. gdb/ChangeLog: * aarch32-tdep.c: Include aarch32-tdep.h. * aarch32-tdep.h: Forward-declare struct target_desc. Change-Id: Ica4be4de0fbd7f22d56a29a40fbf0a31b5abdb16
2019-07-19Arm: Add read_description read funcs and use in GDBAlan Hayward1-0/+33
Switch the Arm target to get target descriptions via arm_read_description and aarch32_read_description, in the same style as other feature targets. Add an enum to specify the different types - this will also be of use to gdbserver in a later patch. Under the hood return the same existing pre-feature target descriptions. gdb/ChangeLog: * Makefile.in: Add new files. * aarch32-tdep.c: New file. * aarch32-tdep.h: New file. * aarch64-linux-nat.c (aarch64_linux_nat_target::read_description): Call aarch32_read_description. * arch/aarch32.c: New file. * arch/aarch32.h: New file. * arch/arm.c (arm_create_target_description) (arm_create_mprofile_target_description): New function. * arch/arm.h (arm_fp_type, arm_m_profile_type): New enum. (arm_create_target_description) (arm_create_mprofile_target_description): New declaration. * arm-fbsd-tdep.c (arm_fbsd_read_description_auxv): Call read_description functions. * arm-linux-nat.c (arm_linux_nat_target::read_description): Likewise. * arm-linux-tdep.c (arm_linux_core_read_description): Likewise. * arm-tdep.c (tdesc_arm_list): New variable. (arm_register_g_packet_guesses): Call create description functions. (arm_read_description) (arm_read_mprofile_description): New function. * arm-tdep.h (arm_read_description) (arm_read_mprofile_description): Add declaration. * configure.tgt: Add new files.