From 8099a7475083e04429990c53cd490cda9eb63d68 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Fri, 10 Sep 2021 07:10:20 -0700 Subject: gdb10: Fixes for ARC Here we add a couple of fixes and improvements for ARC processors. All except 1 patch are already in the upstream "master" branch and will be an essential part of GCC 11.x whenever it gets released. The most important are first 4 patches (0005-0008) which introduce support of full native GDB support in Linux on ARC. And the rests are tiny, yet useful improvements. Signed-off-by: Alexey Brodkin diff --git a/packages/gdb/10.2/0005-arc-Add-support-for-signal-handlers.patch b/packages/gdb/10.2/0005-arc-Add-support-for-signal-handlers.patch new file mode 100644 index 0000000..c7f9545 --- /dev/null +++ b/packages/gdb/10.2/0005-arc-Add-support-for-signal-handlers.patch @@ -0,0 +1,226 @@ +From 977e6e7dc30737b2a8be382e604d2b998d446749 Mon Sep 17 00:00:00 2001 +From: Anton Kolesov +Date: Mon, 22 Aug 2016 19:39:46 +0300 +Subject: [PATCH 06/20] arc: Add support for signal handlers + +This patch adds the necessary infrastructure to handle signal frames for +ARC architecture. It is fairly similar to what any other architecture +would have. Linux specific parts will be in a separate patch. + +v2 [1]: +- Make the logic of "arc_sigtramp_frame_sniffer ()" simpler. + +[1] Tom's remark for the first version +https://sourceware.org/pipermail/gdb-patches/2020-November/173221.html + +gdb/ChangeLog: + + * arc-tdep.c (arc_make_sigtramp_frame_cache): New function. + (arc_sigtramp_frame_this_id): Likewise. + (arc_sigtramp_frame_prev_register): Likewise. + (arc_sigtramp_frame_sniffer): Likewise. + (arc_siftramp_frame_unwind): New global variable. + (arc_gdbarch_init): Use sigtramp capabilities. + (arc_dump_tdep): Print sigtramp fields. + * arc-tdep.h (gdbarch_tdep): Add sigtramp fields. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=b4e3cd0440109d0a5552d3313ccbd35c8103335b +--- + gdb/ChangeLog | 11 +++++ + gdb/arc-tdep.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + gdb/arc-tdep.h | 13 ++++++ + 3 files changed, 147 insertions(+) + +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,3 +1,14 @@ ++2020-12-22 Anton Kolesov ++ ++ * arc-tdep.c (arc_make_sigtramp_frame_cache): New function. ++ (arc_sigtramp_frame_this_id): Likewise. ++ (arc_sigtramp_frame_prev_register): Likewise. ++ (arc_sigtramp_frame_sniffer): Likewise. ++ (arc_siftramp_frame_unwind): New global variable. ++ (arc_gdbarch_init): Use sigtramp capabilities. ++ (arc_dump_tdep): Print sigtramp fields. ++ * arc-tdep.h (gdbarch_tdep): Add sigtramp fields. ++ + 2021-04-25 Joel Brobecker + + * version.in: Set GDB version number to 10.2. +--- a/gdb/arc-tdep.c ++++ b/gdb/arc-tdep.c +@@ -1843,6 +1843,104 @@ + reg->how = DWARF2_FRAME_REG_CFA; + } + ++/* Signal trampoline frame unwinder. Allows frame unwinding to happen ++ from within signal handlers. */ ++ ++static struct arc_frame_cache * ++arc_make_sigtramp_frame_cache (struct frame_info *this_frame) ++{ ++ if (arc_debug) ++ debug_printf ("arc: sigtramp_frame_cache\n"); ++ ++ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame)); ++ ++ /* Allocate new frame cache instance and space for saved register info. */ ++ struct arc_frame_cache *cache = FRAME_OBSTACK_ZALLOC (struct arc_frame_cache); ++ cache->saved_regs = trad_frame_alloc_saved_regs (this_frame); ++ ++ /* Get the stack pointer and use it as the frame base. */ ++ cache->prev_sp = arc_frame_base_address (this_frame, NULL); ++ ++ /* If the ARC-private target-dependent info doesn't have a table of ++ offsets of saved register contents within an OS signal context ++ structure, then there is nothing to analyze. */ ++ if (tdep->sc_reg_offset == NULL) ++ return cache; ++ ++ /* Find the address of the sigcontext structure. */ ++ CORE_ADDR addr = tdep->sigcontext_addr (this_frame); ++ ++ /* For each register, if its contents have been saved within the ++ sigcontext structure, determine the address of those contents. */ ++ gdb_assert (tdep->sc_num_regs <= (ARC_LAST_REGNUM + 1)); ++ for (int i = 0; i < tdep->sc_num_regs; i++) ++ { ++ if (tdep->sc_reg_offset[i] != ARC_OFFSET_NO_REGISTER) ++ cache->saved_regs[i].addr = addr + tdep->sc_reg_offset[i]; ++ } ++ ++ return cache; ++} ++ ++/* Implement the "this_id" frame_unwind method for signal trampoline ++ frames. */ ++ ++static void ++arc_sigtramp_frame_this_id (struct frame_info *this_frame, ++ void **this_cache, struct frame_id *this_id) ++{ ++ if (arc_debug) ++ debug_printf ("arc: sigtramp_frame_this_id\n"); ++ ++ if (*this_cache == NULL) ++ *this_cache = arc_make_sigtramp_frame_cache (this_frame); ++ ++ struct gdbarch *gdbarch = get_frame_arch (this_frame); ++ struct arc_frame_cache *cache = (struct arc_frame_cache *) *this_cache; ++ CORE_ADDR stack_addr = cache->prev_sp; ++ CORE_ADDR code_addr ++ = get_frame_register_unsigned (this_frame, gdbarch_pc_regnum (gdbarch)); ++ *this_id = frame_id_build (stack_addr, code_addr); ++} ++ ++/* Get a register from a signal handler frame. */ ++ ++static struct value * ++arc_sigtramp_frame_prev_register (struct frame_info *this_frame, ++ void **this_cache, int regnum) ++{ ++ if (arc_debug) ++ debug_printf ("arc: sigtramp_frame_prev_register (regnum = %d)\n", regnum); ++ ++ /* Make sure we've initialized the cache. */ ++ if (*this_cache == NULL) ++ *this_cache = arc_make_sigtramp_frame_cache (this_frame); ++ ++ struct arc_frame_cache *cache = (struct arc_frame_cache *) *this_cache; ++ return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum); ++} ++ ++/* Frame sniffer for signal handler frame. Only recognize a frame if we ++ have a sigcontext_addr handler in the target dependency. */ ++ ++static int ++arc_sigtramp_frame_sniffer (const struct frame_unwind *self, ++ struct frame_info *this_frame, ++ void **this_cache) ++{ ++ struct gdbarch_tdep *tdep; ++ ++ if (arc_debug) ++ debug_printf ("arc: sigtramp_frame_sniffer\n"); ++ ++ tdep = gdbarch_tdep (get_frame_arch (this_frame)); ++ ++ /* If we have a sigcontext_addr handler, then just return 1 (same as the ++ "default_frame_sniffer ()"). */ ++ return (tdep->sigcontext_addr != NULL && tdep->is_sigtramp != NULL ++ && tdep->is_sigtramp (this_frame)); ++} ++ + /* Structure defining the ARC ordinary frame unwind functions. Since we are + the fallback unwinder, we use the default frame sniffer, which always + accepts the frame. */ +@@ -1858,6 +1956,21 @@ + NULL + }; + ++/* Structure defining the ARC signal frame unwind functions. Custom ++ sniffer is used, because this frame must be accepted only in the right ++ context. */ ++ ++static const struct frame_unwind arc_sigtramp_frame_unwind = { ++ SIGTRAMP_FRAME, ++ default_frame_unwind_stop_reason, ++ arc_sigtramp_frame_this_id, ++ arc_sigtramp_frame_prev_register, ++ NULL, ++ arc_sigtramp_frame_sniffer, ++ NULL, ++ NULL ++}; ++ + + static const struct frame_base arc_normal_base = { + &arc_frame_unwind, +@@ -2272,6 +2385,7 @@ + /* Frame unwinders and sniffers. */ + dwarf2_frame_set_init_reg (gdbarch, arc_dwarf2_frame_init_reg); + dwarf2_append_unwinders (gdbarch); ++ frame_unwind_append_unwinder (gdbarch, &arc_sigtramp_frame_unwind); + frame_unwind_append_unwinder (gdbarch, &arc_frame_unwind); + frame_base_set_default (gdbarch, &arc_normal_base); + +@@ -2350,6 +2464,15 @@ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + fprintf_unfiltered (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc); ++ ++ fprintf_unfiltered (file, "arc_dump_tdep: is_sigtramp = <%s>\n", ++ host_address_to_string (tdep->is_sigtramp)); ++ fprintf_unfiltered (file, "arc_dump_tdep: sigcontext_addr = <%s>\n", ++ host_address_to_string (tdep->sigcontext_addr)); ++ fprintf_unfiltered (file, "arc_dump_tdep: sc_reg_offset = <%s>\n", ++ host_address_to_string (tdep->sc_reg_offset)); ++ fprintf_unfiltered (file, "arc_dump_tdep: sc_num_regs = %d\n", ++ tdep->sc_num_regs); + } + + /* This command accepts single argument - address of instruction to +--- a/gdb/arc-tdep.h ++++ b/gdb/arc-tdep.h +@@ -124,6 +124,19 @@ + + /* Whether target has hardware (aka zero-delay) loops. */ + bool has_hw_loops; ++ ++ /* Detect sigtramp. */ ++ bool (*is_sigtramp) (struct frame_info *); ++ ++ /* Get address of sigcontext for sigtramp. */ ++ CORE_ADDR (*sigcontext_addr) (struct frame_info *); ++ ++ /* Offset of registers in `struct sigcontext'. */ ++ const int *sc_reg_offset; ++ ++ /* Number of registers in sc_reg_offsets. Most likely a ARC_LAST_REGNUM, ++ but in theory it could be less, so it is kept separate. */ ++ int sc_num_regs; + }; + + /* Utility functions used by other ARC-specific modules. */ diff --git a/packages/gdb/10.2/0006-arc-Add-support-for-signal-frames-for-Linux-targets.patch b/packages/gdb/10.2/0006-arc-Add-support-for-signal-frames-for-Linux-targets.patch new file mode 100644 index 0000000..add2a0e --- /dev/null +++ b/packages/gdb/10.2/0006-arc-Add-support-for-signal-frames-for-Linux-targets.patch @@ -0,0 +1,240 @@ +From 27a456bbaa0c525e534195d17345c2e9268dd5d2 Mon Sep 17 00:00:00 2001 +From: Anton Kolesov +Date: Thu, 22 Dec 2016 21:52:16 +0300 +Subject: [PATCH 07/20] arc: Add support for signal frames for Linux targets + +Implement functions needed to unwind signal frames on ARC Linux targets. + +gdb/ChangeLog + + * arc-linux-tdep.c (arc_linux_sc_reg_offsets): New static variable. + (arc_linux_is_sigtramp): New function. + (arc_linux_sigcontext_addr): Likewise. + (arc_linux_init_osabi): Use them. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=d4af727286e3a9f177ba11677fbd3a012d36558a +--- + gdb/ChangeLog | 7 + + gdb/arc-linux-tdep.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 188 insertions(+) + +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,5 +1,12 @@ + 2020-12-22 Anton Kolesov + ++ * arc-linux-tdep.c (arc_linux_sc_reg_offsets): New static variable. ++ (arc_linux_is_sigtramp): New function. ++ (arc_linux_sigcontext_addr): Likewise. ++ (arc_linux_init_osabi): Use them. ++ ++2020-12-22 Anton Kolesov ++ + * arc-tdep.c (arc_make_sigtramp_frame_cache): New function. + (arc_sigtramp_frame_this_id): Likewise. + (arc_sigtramp_frame_prev_register): Likewise. +--- a/gdb/arc-linux-tdep.c ++++ b/gdb/arc-linux-tdep.c +@@ -33,6 +33,60 @@ + + #define REGOFF(offset) (offset * ARC_REGISTER_SIZE) + ++/* arc_linux_sc_reg_offsets[i] is the offset of register i in the `struct ++ sigcontext'. Array index is an internal GDB register number, as defined in ++ arc-tdep.h:arc_regnum. ++ ++ From and . ++ ++ The layout of this struct is tightly bound to "arc_regnum" enum ++ in arc-tdep.h. Any change of order in there, must be reflected ++ here as well. */ ++static const int arc_linux_sc_reg_offsets[] = { ++ /* R0 - R12. */ ++ REGOFF (22), REGOFF (21), REGOFF (20), REGOFF (19), ++ REGOFF (18), REGOFF (17), REGOFF (16), REGOFF (15), ++ REGOFF (14), REGOFF (13), REGOFF (12), REGOFF (11), ++ REGOFF (10), ++ ++ /* R13 - R25. */ ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ++ ++ REGOFF (9), /* R26 (GP) */ ++ REGOFF (8), /* FP */ ++ REGOFF (23), /* SP */ ++ ARC_OFFSET_NO_REGISTER, /* ILINK */ ++ ARC_OFFSET_NO_REGISTER, /* R30 */ ++ REGOFF (7), /* BLINK */ ++ ++ /* R32 - R59. */ ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ++ ARC_OFFSET_NO_REGISTER, ++ ++ REGOFF (4), /* LP_COUNT */ ++ ARC_OFFSET_NO_REGISTER, /* RESERVED */ ++ ARC_OFFSET_NO_REGISTER, /* LIMM */ ++ ARC_OFFSET_NO_REGISTER, /* PCL */ ++ ++ REGOFF (6), /* PC */ ++ REGOFF (5), /* STATUS32 */ ++ REGOFF (2), /* LP_START */ ++ REGOFF (3), /* LP_END */ ++ REGOFF (1), /* BTA */ ++}; ++ + /* arc_linux_core_reg_offsets[i] is the offset in the .reg section of GDB + regnum i. Array index is an internal GDB register number, as defined in + arc-tdep.h:arc_regnum. +@@ -87,6 +141,127 @@ + REGOFF (6) /* ERET */ + }; + ++/* Is THIS_FRAME a sigtramp function - the function that returns from ++ signal handler into normal execution flow? This is the case if the PC is ++ either at the start of, or in the middle of the two instructions: ++ ++ mov r8, __NR_rt_sigreturn ; __NR_rt_sigreturn == 139 ++ trap_s 0 ; `swi' for ARC700 ++ ++ On ARC uClibc Linux this function is called __default_rt_sa_restorer. ++ ++ Returns TRUE if this is a sigtramp frame. */ ++ ++static bool ++arc_linux_is_sigtramp (struct frame_info *this_frame) ++{ ++ struct gdbarch *gdbarch = get_frame_arch (this_frame); ++ CORE_ADDR pc = get_frame_pc (this_frame); ++ ++ if (arc_debug) ++ { ++ debug_printf ("arc-linux: arc_linux_is_sigtramp, pc=%s\n", ++ paddress(gdbarch, pc)); ++ } ++ ++ static const gdb_byte insns_be_hs[] = { ++ 0x20, 0x8a, 0x12, 0xc2, /* mov r8,nr_rt_sigreturn */ ++ 0x78, 0x1e /* trap_s 0 */ ++ }; ++ static const gdb_byte insns_be_700[] = { ++ 0x20, 0x8a, 0x12, 0xc2, /* mov r8,nr_rt_sigreturn */ ++ 0x22, 0x6f, 0x00, 0x3f /* swi */ ++ }; ++ ++ gdb_byte arc_sigtramp_insns[sizeof (insns_be_700)]; ++ size_t insns_sz; ++ if (arc_mach_is_arcv2 (gdbarch)) ++ { ++ insns_sz = sizeof (insns_be_hs); ++ memcpy (arc_sigtramp_insns, insns_be_hs, insns_sz); ++ } ++ else ++ { ++ insns_sz = sizeof (insns_be_700); ++ memcpy (arc_sigtramp_insns, insns_be_700, insns_sz); ++ } ++ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) ++ { ++ /* On little endian targets, ARC code section is in what is called ++ "middle endian", where half-words are in the big-endian order, ++ only bytes inside the halfwords are in the little endian order. ++ As a result it is very easy to convert big endian instruction to ++ little endian, since it is needed to swap bytes in the halfwords, ++ so there is no need to have information on whether that is a ++ 4-byte instruction or 2-byte. */ ++ gdb_assert ((insns_sz % 2) == 0); ++ for (int i = 0; i < insns_sz; i += 2) ++ std::swap (arc_sigtramp_insns[i], arc_sigtramp_insns[i+1]); ++ } ++ ++ gdb_byte buf[insns_sz]; ++ ++ /* Read the memory at the PC. Since we are stopped, any breakpoint must ++ have been removed. */ ++ if (!safe_frame_unwind_memory (this_frame, pc, buf, insns_sz)) ++ { ++ /* Failed to unwind frame. */ ++ return FALSE; ++ } ++ ++ /* Is that code the sigtramp instruction sequence? */ ++ if (memcmp (buf, arc_sigtramp_insns, insns_sz) == 0) ++ return TRUE; ++ ++ /* No - look one instruction earlier in the code... */ ++ if (!safe_frame_unwind_memory (this_frame, pc - 4, buf, insns_sz)) ++ { ++ /* Failed to unwind frame. */ ++ return FALSE; ++ } ++ ++ return (memcmp (buf, arc_sigtramp_insns, insns_sz) == 0); ++} ++ ++/* Get sigcontext structure of sigtramp frame - it contains saved ++ registers of interrupted frame. ++ ++ Stack pointer points to the rt_sigframe structure, and sigcontext can ++ be found as in: ++ ++ struct rt_sigframe { ++ struct siginfo info; ++ struct ucontext uc; ++ ... ++ }; ++ ++ struct ucontext { ++ unsigned long uc_flags; ++ struct ucontext *uc_link; ++ stack_t uc_stack; ++ struct sigcontext uc_mcontext; ++ sigset_t uc_sigmask; ++ }; ++ ++ sizeof (struct siginfo) == 0x80 ++ offsetof (struct ucontext, uc_mcontext) == 0x14 ++ ++ GDB cannot include linux headers and use offsetof () because those are ++ target headers and GDB might be built for a different run host. There ++ doesn't seem to be an established mechanism to figure out those offsets ++ via gdbserver, so the only way is to hardcode values in the GDB, ++ meaning that GDB will be broken if values will change. That seems to ++ be a very unlikely scenario and other arches (aarch64, alpha, amd64, ++ etc) in GDB hardcode values. */ ++ ++static CORE_ADDR ++arc_linux_sigcontext_addr (struct frame_info *this_frame) ++{ ++ const int ucontext_offset = 0x80; ++ const int sigcontext_offset = 0x14; ++ return get_frame_sp (this_frame) + ucontext_offset + sigcontext_offset; ++} ++ + /* Implement the "cannot_fetch_register" gdbarch method. */ + + static int +@@ -504,6 +679,12 @@ + if (arc_debug) + debug_printf ("arc-linux: GNU/Linux OS/ABI initialization.\n"); + ++ /* Fill in target-dependent info in ARC-private structure. */ ++ tdep->is_sigtramp = arc_linux_is_sigtramp; ++ tdep->sigcontext_addr = arc_linux_sigcontext_addr; ++ tdep->sc_reg_offset = arc_linux_sc_reg_offsets; ++ tdep->sc_num_regs = ARRAY_SIZE (arc_linux_sc_reg_offsets); ++ + /* If we are using Linux, we have in uClibc + (libc/sysdeps/linux/arc/bits/setjmp.h): + diff --git a/packages/gdb/10.2/0007-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch b/packages/gdb/10.2/0007-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch new file mode 100644 index 0000000..98a889f --- /dev/null +++ b/packages/gdb/10.2/0007-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch @@ -0,0 +1,110 @@ +From 7cf6f67aee277a37a7c648ca41a46a2c04aec2ed Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Tue, 10 Nov 2020 19:34:57 +0100 +Subject: [PATCH 08/20] arc: Take into account the REGNUM in supply/collect gdb + hooks + +All the arc_linux_supply_*() target operations and the +arc_linux_collect_v2_regset() in arc-linux-tdep.c were +supplying/collecting all the registers in regcache as if the +REGNUM was set to -1. + +The more efficient behavior is to examine the REGNUM and act +accordingly. That is what this patch does. + +gdb/ChangeLog: + + * arc-linux-tdep.c (supply_register): New. + (arc_linux_supply_gregset, arc_linux_supply_v2_regset, + arc_linux_collect_v2_regset): Consider REGNUM. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=46023bbe81355230b4e7b76d3084337823d02362 +--- + gdb/ChangeLog | 6 ++++++ + gdb/arc-linux-tdep.c | 41 ++++++++++++++++++++++++++++++++--------- + 2 files changed, 38 insertions(+), 9 deletions(-) + +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,3 +1,9 @@ ++2020-12-22 Shahab Vahedi ++ ++ * arc-linux-tdep.c (supply_register): New. ++ (arc_linux_supply_gregset, arc_linux_supply_v2_regset, ++ arc_linux_collect_v2_regset): Consider REGNUM. ++ + 2020-12-22 Anton Kolesov + + * arc-linux-tdep.c (arc_linux_sc_reg_offsets): New static variable. +--- a/gdb/arc-linux-tdep.c ++++ b/gdb/arc-linux-tdep.c +@@ -535,6 +535,18 @@ + } + } + ++/* Populate REGCACHE with register REGNUM from BUF. */ ++ ++static void ++supply_register (struct regcache *regcache, int regnum, const gdb_byte *buf) ++{ ++ /* Skip non-existing registers. */ ++ if ((arc_linux_core_reg_offsets[regnum] == ARC_OFFSET_NO_REGISTER)) ++ return; ++ ++ regcache->raw_supply (regnum, buf + arc_linux_core_reg_offsets[regnum]); ++} ++ + void + arc_linux_supply_gregset (const struct regset *regset, + struct regcache *regcache, +@@ -545,9 +557,14 @@ + + const bfd_byte *buf = (const bfd_byte *) gregs; + +- for (int reg = 0; reg <= ARC_LAST_REGNUM; reg++) +- if (arc_linux_core_reg_offsets[reg] != ARC_OFFSET_NO_REGISTER) +- regcache->raw_supply (reg, buf + arc_linux_core_reg_offsets[reg]); ++ /* regnum == -1 means writing all the registers. */ ++ if (regnum == -1) ++ for (int reg = 0; reg <= ARC_LAST_REGNUM; reg++) ++ supply_register (regcache, reg, buf); ++ else if (regnum <= ARC_LAST_REGNUM) ++ supply_register (regcache, regnum, buf); ++ else ++ gdb_assert_not_reached ("Invalid regnum in arc_linux_supply_gregset."); + } + + void +@@ -558,9 +575,12 @@ + const bfd_byte *buf = (const bfd_byte *) v2_regs; + + /* user_regs_arcv2 is defined in linux arch/arc/include/uapi/asm/ptrace.h. */ +- regcache->raw_supply (ARC_R30_REGNUM, buf); +- regcache->raw_supply (ARC_R58_REGNUM, buf + REGOFF (1)); +- regcache->raw_supply (ARC_R59_REGNUM, buf + REGOFF (2)); ++ if (regnum == -1 || regnum == ARC_R30_REGNUM) ++ regcache->raw_supply (ARC_R30_REGNUM, buf); ++ if (regnum == -1 || regnum == ARC_R58_REGNUM) ++ regcache->raw_supply (ARC_R58_REGNUM, buf + REGOFF (1)); ++ if (regnum == -1 || regnum == ARC_R59_REGNUM) ++ regcache->raw_supply (ARC_R59_REGNUM, buf + REGOFF (2)); + } + + /* Populate BUF with register REGNUM from the REGCACHE. */ +@@ -618,9 +638,12 @@ + { + bfd_byte *buf = (bfd_byte *) v2_regs; + +- regcache->raw_collect (ARC_R30_REGNUM, buf); +- regcache->raw_collect (ARC_R58_REGNUM, buf + REGOFF (1)); +- regcache->raw_collect (ARC_R59_REGNUM, buf + REGOFF (2)); ++ if (regnum == -1 || regnum == ARC_R30_REGNUM) ++ regcache->raw_collect (ARC_R30_REGNUM, buf); ++ if (regnum == -1 || regnum == ARC_R58_REGNUM) ++ regcache->raw_collect (ARC_R58_REGNUM, buf + REGOFF (1)); ++ if (regnum == -1 || regnum == ARC_R59_REGNUM) ++ regcache->raw_collect (ARC_R59_REGNUM, buf + REGOFF (2)); + } + + /* Linux regset definitions. */ diff --git a/packages/gdb/10.2/0008-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch b/packages/gdb/10.2/0008-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch new file mode 100644 index 0000000..7ff7b28 --- /dev/null +++ b/packages/gdb/10.2/0008-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch @@ -0,0 +1,413 @@ +From 59a76f39ab17bf00545559c0c655ba89405d478d Mon Sep 17 00:00:00 2001 +From: Anton Kolesov +Date: Fri, 14 Feb 2014 11:56:23 +0400 +Subject: [PATCH 09/20] gdb: Add native support for ARC in GNU/Linux + +With this patch in place it is possible to build a GDB that +can run on ARC (GNU/Linux) hosts for debugging ARC targets. + +The "arc-linux-nat.c" is a rather small one that mostly deals +with registers and a few thread related hooks. + +v2 [1]: +- Remove "void" from the input of "_initialize_arc_linux_nat ()" + +[1] Tom's remark after the first patch +https://sourceware.org/pipermail/gdb-patches/2020-November/173223.html + +gdb/ChangeLog: + + * Makefile.in (ALLDEPFILES): Add arc-linux-nat.c. + * configure.host (host to gdb names): Add arc*-*-linux*. + * configure.nat (gdb_host_cpu): Add arc. + * arc-linux-nat.c: New. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=04c9f85efcd8df5fc482ce97c0104cc7dd5d19e6 +--- + gdb/ChangeLog | 7 + + gdb/Makefile.in | 1 + gdb/arc-linux-nat.c | 320 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + gdb/configure.host | 3 + gdb/configure.nat | 4 + 5 files changed, 335 insertions(+) + create mode 100644 gdb/arc-linux-nat.c + +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,3 +1,10 @@ ++2020-12-22 Anton Kolesov ++ ++ * Makefile.in (ALLDEPFILES): Add arc-linux-nat.c. ++ * configure.host (host to gdb names): Add arc*-*-linux*. ++ * configure.nat (gdb_host_cpu): Add arc. ++ * arc-linux-nat.c: New. ++ + 2020-12-22 Shahab Vahedi + + * arc-linux-tdep.c (supply_register): New. +--- a/gdb/Makefile.in ++++ b/gdb/Makefile.in +@@ -2136,6 +2136,7 @@ + amd64-obsd-tdep.c \ + amd64-sol2-tdep.c \ + amd64-tdep.c \ ++ arc-linux-nat.c \ + arc-tdep.c \ + arm.c \ + arm-bsd-tdep.c \ +--- /dev/null ++++ b/gdb/arc-linux-nat.c +@@ -0,0 +1,320 @@ ++/* Native-dependent code for GNU/Linux ARC. ++ ++ Copyright 2020 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include "defs.h" ++#include "frame.h" ++#include "inferior.h" ++#include "gdbcore.h" ++#include "regcache.h" ++#include "gdbsupport/gdb_assert.h" ++#include "target.h" ++#include "linux-nat.h" ++#include "nat/gdb_ptrace.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "gdbsupport/gdb_wait.h" ++#include ++#include ++#include ++ ++#include "gregset.h" ++#include "arc-tdep.h" ++#include "arc-linux-tdep.h" ++#include "arch/arc.h" ++ ++/* Defines ps_err_e, struct ps_prochandle. */ ++#include "gdb_proc_service.h" ++ ++/* Linux starting with 4.12 supports NT_ARC_V2 note type, which adds R30, ++ R58 and R59 registers, which are specific to ARC HS and aren't ++ available in ARC 700. */ ++#if defined (NT_ARC_V2) && defined (__ARCHS__) ++#define ARC_HAS_V2_REGSET ++#endif ++ ++class arc_linux_nat_target final : public linux_nat_target ++{ ++public: ++ /* Add ARC register access methods. */ ++ void fetch_registers (struct regcache *, int) override; ++ void store_registers (struct regcache *, int) override; ++ ++ const struct target_desc *read_description () override; ++ ++ /* Handle threads */ ++ void low_prepare_to_resume (struct lwp_info *lp) override; ++}; ++ ++static arc_linux_nat_target the_arc_linux_nat_target; ++ ++/* Read general registers from target process/thread (via ptrace) ++ into REGCACHE. */ ++ ++static void ++fetch_gregs (struct regcache *regcache, int regnum) ++{ ++ const int tid = get_ptrace_pid (regcache->ptid ()); ++ struct iovec iov; ++ gdb_gregset_t regs; ++ ++ iov.iov_base = ®s; ++ iov.iov_len = sizeof (gdb_gregset_t); ++ ++ if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0) ++ perror_with_name (_("Couldn't get general registers")); ++ else ++ arc_linux_supply_gregset (NULL, regcache, regnum, ®s, 0); ++} ++ ++#ifdef ARC_HAS_V2_REGSET ++/* Read ARC v2 registers from target process/thread (via ptrace) ++ into REGCACHE. */ ++ ++static void ++fetch_v2_regs (struct regcache *regcache, int regnum) ++{ ++ const int tid = get_ptrace_pid (regcache->ptid ()); ++ struct iovec iov; ++ bfd_byte v2_buffer[ARC_LINUX_SIZEOF_V2_REGSET]; ++ ++ iov.iov_base = &v2_buffer; ++ iov.iov_len = ARC_LINUX_SIZEOF_V2_REGSET; ++ ++ if (ptrace (PTRACE_GETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0) ++ perror_with_name (_("Couldn't get ARC HS registers")); ++ else ++ arc_linux_supply_v2_regset (NULL, regcache, regnum, v2_buffer, 0); ++} ++#endif ++ ++/* Store general registers from REGCACHE into the target process/thread. */ ++ ++static void ++store_gregs (const struct regcache *regcache, int regnum) ++{ ++ const int tid = get_ptrace_pid (regcache->ptid ()); ++ struct iovec iov; ++ gdb_gregset_t regs; ++ ++ iov.iov_base = ®s; ++ iov.iov_len = sizeof (gdb_gregset_t); ++ ++ if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0) ++ perror_with_name (_("Couldn't get general registers")); ++ else ++ { ++ arc_linux_collect_gregset (NULL, regcache, regnum, regs, 0); ++ ++ if (ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0) ++ perror_with_name (_("Couldn't write general registers")); ++ } ++} ++ ++#ifdef ARC_HAS_V2_REGSET ++/* Store ARC v2 registers from REGCACHE into the target process/thread. */ ++ ++static void ++store_v2_regs (const struct regcache *regcache, int regnum) ++{ ++ const int tid = get_ptrace_pid (regcache->ptid ()); ++ struct iovec iov; ++ bfd_byte v2_buffer[ARC_LINUX_SIZEOF_V2_REGSET]; ++ ++ iov.iov_base = &v2_buffer; ++ iov.iov_len = ARC_LINUX_SIZEOF_V2_REGSET; ++ ++ if (ptrace (PTRACE_GETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0) ++ perror_with_name (_("Couldn't get ARC HS registers")); ++ else ++ { ++ arc_linux_collect_v2_regset (NULL, regcache, regnum, v2_buffer, 0); ++ ++ if (ptrace (PTRACE_SETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0) ++ perror_with_name (_("Couldn't write ARC HS registers")); ++ } ++} ++#endif ++ ++/* Target operation: Read REGNUM register (all registers if REGNUM == -1) ++ from target process into REGCACHE. */ ++ ++void ++arc_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum) ++{ ++ ++ if (regnum == -1 || regnum <= ARC_LAST_REGNUM) ++ fetch_gregs (regcache, regnum); ++ ++#ifdef ARC_HAS_V2_REGSET ++ if (regnum == -1 ++ || regnum == ARC_R30_REGNUM ++ || regnum == ARC_R58_REGNUM ++ || regnum == ARC_R59_REGNUM) ++ fetch_v2_regs (regcache, regnum); ++#endif ++} ++ ++/* Target operation: Store REGNUM register (all registers if REGNUM == -1) ++ to the target process from REGCACHE. */ ++ ++void ++arc_linux_nat_target::store_registers (struct regcache *regcache, int regnum) ++{ ++ if (regnum == -1 || regnum <= ARC_LAST_REGNUM) ++ store_gregs (regcache, regnum); ++ ++#ifdef ARC_HAS_V2_REGSET ++ if (regnum == -1 ++ || regnum == ARC_R30_REGNUM ++ || regnum == ARC_R58_REGNUM ++ || regnum == ARC_R59_REGNUM) ++ store_v2_regs (regcache, regnum); ++#endif ++} ++ ++/* Copy general purpose register(s) from REGCACHE into regset GREGS. ++ This function is exported to proc-service.c */ ++ ++void ++fill_gregset (const struct regcache *regcache, ++ gdb_gregset_t *gregs, int regnum) ++{ ++ arc_linux_collect_gregset (NULL, regcache, regnum, gregs, 0); ++} ++ ++/* Copy all the general purpose registers from regset GREGS into REGCACHE. ++ This function is exported to proc-service.c. */ ++ ++void ++supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregs) ++{ ++ arc_linux_supply_gregset (NULL, regcache, -1, gregs, 0); ++} ++ ++/* ARC doesn't have separate FP registers. This function is exported ++ to proc-service.c. */ ++ ++void ++fill_fpregset (const struct regcache *regcache, ++ gdb_fpregset_t *fpregsetp, int regnum) ++{ ++ if (arc_debug) ++ debug_printf ("arc-linux-nat: fill_fpregset called."); ++ return; ++} ++ ++/* ARC doesn't have separate FP registers. This function is exported ++ to proc-service.c. */ ++ ++void ++supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) ++{ ++ if (arc_debug) ++ debug_printf ("arc-linux-nat: supply_fpregset called."); ++ return; ++} ++ ++/* Implement the "read_description" method of linux_nat_target. */ ++ ++const struct target_desc * ++arc_linux_nat_target::read_description () ++{ ++ /* This is a native target, hence description is hardcoded. */ ++#ifdef __ARCHS__ ++ arc_arch_features features (4, ARC_ISA_ARCV2); ++#else ++ arc_arch_features features (4, ARC_ISA_ARCV1); ++#endif ++ return arc_lookup_target_description (features); ++} ++ ++/* As described in arc_linux_collect_gregset(), we need to write resume-PC ++ to ERET. However by default GDB for native targets doesn't write ++ registers if they haven't been changed. This is a callback called by ++ generic GDB, and in this callback we have to rewrite PC value so it ++ would force rewrite of register on target. It seems that the only ++ other arch that utilizes this hook is x86/x86-64 for HW breakpoint ++ support. But then, AFAIK no other arch has this stop_pc/eret ++ complexity. ++ ++ No better way was found, other than this fake write of register value, ++ to force GDB into writing register to target. Is there any? */ ++ ++void ++arc_linux_nat_target::low_prepare_to_resume (struct lwp_info *lwp) ++{ ++ /* When new processes and threads are created we do not have the address ++ space for them and calling get_thread_regcache will cause an internal ++ error in GDB. It looks like that checking for last_resume_kind is the ++ sensible way to determine processes for which we cannot get regcache. ++ Ultimately, a better way would be removing the need for ++ low_prepare_to_resume in the first place. */ ++ if (lwp->last_resume_kind == resume_stop) ++ return; ++ ++ struct regcache *regcache = get_thread_regcache (this, lwp->ptid); ++ struct gdbarch *gdbarch = regcache->arch (); ++ ++ /* Read current PC value, then write it back. It is required to call ++ invalidate(), otherwise GDB will note that new value is equal to old ++ value and will skip write. */ ++ ULONGEST new_pc; ++ regcache_cooked_read_unsigned (regcache, gdbarch_pc_regnum (gdbarch), ++ &new_pc); ++ regcache->invalidate (gdbarch_pc_regnum (gdbarch)); ++ regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch), ++ new_pc); ++} ++ ++/* Fetch the thread-local storage pointer for libthread_db. Note that ++ this function is not called from GDB, but is called from libthread_db. ++ This is required to debug multithreaded applications with NPTL. */ ++ ++ps_err_e ++ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, ++ void **base) ++{ ++ if (arc_debug >= 2) ++ debug_printf ("arc-linux-nat: ps_get_thread_area called"); ++ ++ if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0) ++ return PS_ERR; ++ ++ /* IDX is the bias from the thread pointer to the beginning of the ++ thread descriptor. It has to be subtracted due to implementation ++ quirks in libthread_db. */ ++ *base = (void *) ((char *) *base - idx); ++ ++ return PS_OK; ++} ++ ++/* Suppress warning from -Wmissing-prototypes. */ ++void _initialize_arc_linux_nat (); ++void ++_initialize_arc_linux_nat () ++{ ++ /* Register the target. */ ++ linux_target = &the_arc_linux_nat_target; ++ add_inf_child_target (&the_arc_linux_nat_target); ++} +--- a/gdb/configure.host ++++ b/gdb/configure.host +@@ -60,6 +60,7 @@ + + aarch64*) gdb_host_cpu=aarch64 ;; + alpha*) gdb_host_cpu=alpha ;; ++arc*) gdb_host_cpu=arc ;; + arm*) gdb_host_cpu=arm ;; + hppa*) gdb_host_cpu=pa ;; + i[34567]86*) gdb_host_cpu=i386 ;; +@@ -91,6 +92,8 @@ + gdb_host=nbsd ;; + alpha*-*-openbsd*) gdb_host=nbsd ;; + ++arc*-*-linux*) gdb_host=linux ;; ++ + arm*-*-freebsd*) gdb_host=fbsd ;; + arm*-*-linux*) gdb_host=linux ;; + arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu) +--- a/gdb/configure.nat ++++ b/gdb/configure.nat +@@ -238,6 +238,10 @@ + nat/aarch64-linux.o \ + nat/aarch64-sve-linux-ptrace.o" + ;; ++ arc) ++ # Host: ARC based machine running GNU/Linux ++ NATDEPFILES="${NATDEPFILES} arc-linux-nat.o" ++ ;; + arm) + # Host: ARM based machine running GNU/Linux + NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \ diff --git a/packages/gdb/10.2/0009-arc-Make-variable-name-in-comments-uppercase.patch b/packages/gdb/10.2/0009-arc-Make-variable-name-in-comments-uppercase.patch new file mode 100644 index 0000000..eb647f6 --- /dev/null +++ b/packages/gdb/10.2/0009-arc-Make-variable-name-in-comments-uppercase.patch @@ -0,0 +1,49 @@ +From f1369c8a098508296d4c28b97e1f196d94b7b506 Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Tue, 22 Dec 2020 12:27:00 +0100 +Subject: [PATCH 12/20] arc: Make variable name in comments uppercase + +The word "regnum" in comments should be uppercase, because it +reflects a variable name in the code. + +gdb/ChangeLog + + * arc-linux-tdep.c: Replace "regnum" with "REGNUM" in comments. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=acf10cacc6bd596ef7327063038bb1ee020c07d0 +--- + gdb/ChangeLog | 4 ++++ + gdb/arc-linux-tdep.c | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,3 +1,7 @@ ++2020-12-22 Shahab Vahedi ++ ++ * arc-linux-tdep.c: Replace "regnum" with "REGNUM" in comments. ++ + 2020-12-22 Anton Kolesov + + * Makefile.in (ALLDEPFILES): Add arc-linux-nat.c. +--- a/gdb/arc-linux-tdep.c ++++ b/gdb/arc-linux-tdep.c +@@ -557,7 +557,7 @@ + + const bfd_byte *buf = (const bfd_byte *) gregs; + +- /* regnum == -1 means writing all the registers. */ ++ /* REGNUM == -1 means writing all the registers. */ + if (regnum == -1) + for (int reg = 0; reg <= ARC_LAST_REGNUM; reg++) + supply_register (regcache, reg, buf); +@@ -621,7 +621,7 @@ + gdb_byte *buf = (gdb_byte *) gregs; + struct gdbarch *gdbarch = regcache->arch (); + +- /* regnum == -1 means writing all the registers. */ ++ /* REGNUM == -1 means writing all the registers. */ + if (regnum == -1) + for (int reg = 0; reg <= ARC_LAST_REGNUM; reg++) + collect_register (regcache, gdbarch, reg, buf); diff --git a/packages/gdb/10.2/0010-gdb-Log-pc-value-in-arc_skip_prologue.patch b/packages/gdb/10.2/0010-gdb-Log-pc-value-in-arc_skip_prologue.patch new file mode 100644 index 0000000..8c49d6c --- /dev/null +++ b/packages/gdb/10.2/0010-gdb-Log-pc-value-in-arc_skip_prologue.patch @@ -0,0 +1,28 @@ +From 125e6622d74a7477943c88244c48a093537b3661 Mon Sep 17 00:00:00 2001 +From: Anton Kolesov +Date: Wed, 28 Jun 2017 13:15:46 +0300 +Subject: [PATCH 13/20] gdb: Log "pc" value in "arc_skip_prologue" + +Log the "pc" address upon entering "arc_skip_prologue". + +gdb/ChangeLog: + + * arc-tdep.c (arc_skip_prologue): Log "pc" address. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=d56834cbfb7c14b2ad723c75cc56db2de3c0f0e7 +--- + gdb/arc-tdep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gdb/arc-tdep.c ++++ b/gdb/arc-tdep.c +@@ -1493,7 +1493,7 @@ + arc_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) + { + if (arc_debug) +- debug_printf ("arc: skip_prologue\n"); ++ debug_printf ("arc: skip_prologue (pc=%s)\n", paddress (gdbarch, pc)); + + CORE_ADDR func_addr; + const char *func_name; diff --git a/packages/gdb/10.2/0011-gdb-Use-correct-feature-in-tdesc-regs-for-ARC.patch b/packages/gdb/10.2/0011-gdb-Use-correct-feature-in-tdesc-regs-for-ARC.patch new file mode 100644 index 0000000..6d0f3f0 --- /dev/null +++ b/packages/gdb/10.2/0011-gdb-Use-correct-feature-in-tdesc-regs-for-ARC.patch @@ -0,0 +1,32 @@ +From cf33efc0d41a81c67511954fe75b7f63048d86a9 Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Tue, 10 Dec 2019 16:25:08 +0100 +Subject: [PATCH 14/20] gdb: Use correct feature in tdesc-regs for ARC + +tdesc-regs.exp test fails for ARC because the test is not +using the correct XML files as target description. With +this change, the correct directory and files are used. + +gdb/testsuite/ChangeLog: +2020-04-01 Shahab Vahedi + + * gdb.xml/tdesc-regs.exp: Use correct core-regs for ARC. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=3eccb1c8bfd1f119bbc55bf2821d0e4d76116b67 +--- + gdb/testsuite/gdb.xml/tdesc-regs.exp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp ++++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp +@@ -32,7 +32,8 @@ + } + "arc*-*-*" { + set architecture "arc:ARCv2" +- set core-regs {arc-v2.xml} ++ set regdir "arc/" ++ set core-regs {core-v2.xml aux-v2.xml} + } + "arm*-*-*" { + set regdir "arm/" diff --git a/packages/gdb/10.2/0012-gdb-Add-default-reggroups-for-ARC.patch b/packages/gdb/10.2/0012-gdb-Add-default-reggroups-for-ARC.patch new file mode 100644 index 0000000..f0df352 --- /dev/null +++ b/packages/gdb/10.2/0012-gdb-Add-default-reggroups-for-ARC.patch @@ -0,0 +1,67 @@ +From 4bbb306263d4258b279d64a6012f5817aff87e56 Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Wed, 15 Jan 2020 00:14:24 +0100 +Subject: [PATCH 15/20] gdb: Add default reggroups for ARC + +There is no reggroups set in ARC. If a "maintenance print reggroups" +command is issued, the default register set is dumped (which is fine). + +However, if a new group is added via an XML file, then that will +become the _only_ group. This behavior causes gdb.xml/tdesc-regs.exp +to fail. + +Fixes gdb.xml/tdesc-regs.exp on ARC. + +gdb/ChangeLog: +2020-01-15 Shahab Vahedi + + * arc-tdep.c (arc_add_reggroups): New function. + (arc_gdbarch_init): Call arc_add_reggroups. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=d0cc52bdf2e6a586cac70000518c95619970619b +--- + gdb/arc-tdep.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- a/gdb/arc-tdep.c ++++ b/gdb/arc-tdep.c +@@ -27,6 +27,7 @@ + #include "frame-base.h" + #include "frame-unwind.h" + #include "gdbcore.h" ++#include "reggroups.h" + #include "gdbcmd.h" + #include "objfiles.h" + #include "osabi.h" +@@ -1979,6 +1980,20 @@ + arc_frame_base_address + }; + ++/* Add all the expected register sets into GDBARCH. */ ++ ++static void ++arc_add_reggroups (struct gdbarch *gdbarch) ++{ ++ reggroup_add (gdbarch, general_reggroup); ++ reggroup_add (gdbarch, float_reggroup); ++ reggroup_add (gdbarch, system_reggroup); ++ reggroup_add (gdbarch, vector_reggroup); ++ reggroup_add (gdbarch, all_reggroup); ++ reggroup_add (gdbarch, save_reggroup); ++ reggroup_add (gdbarch, restore_reggroup); ++} ++ + static enum arc_isa + mach_type_to_arc_isa (const unsigned long mach) + { +@@ -2382,6 +2397,9 @@ + /* This doesn't include possible long-immediate value. */ + set_gdbarch_max_insn_length (gdbarch, 4); + ++ /* Add default register groups. */ ++ arc_add_reggroups (gdbarch); ++ + /* Frame unwinders and sniffers. */ + dwarf2_frame_set_init_reg (gdbarch, arc_dwarf2_frame_init_reg); + dwarf2_append_unwinders (gdbarch); diff --git a/packages/gdb/10.2/0013-arc-Construct-disassembler-options-dynamically.patch b/packages/gdb/10.2/0013-arc-Construct-disassembler-options-dynamically.patch new file mode 100644 index 0000000..d656f74 --- /dev/null +++ b/packages/gdb/10.2/0013-arc-Construct-disassembler-options-dynamically.patch @@ -0,0 +1,288 @@ +From 8b8464d228b46a2abd677a0a440e0d08da75df0b Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Wed, 2 Jun 2021 15:30:16 +0300 +Subject: [PATCH 16/20] arc: Construct disassembler options dynamically + +The idea of this change is simple: Populate a data structure, namely +"disasm_option_and_arg_t" from "include/dis-asm.h", to encompass the +disassembly options and their possible arguments. + +This will make it easier to manage or extend those options by adapting +entries in a data structure, "arc_options". There will be lesser need +to hard-code the options in the code itself. Moreover, ARC GDB will +use this population function, "disassembler_options_arc ()", to enable +the "set disassembler-option" for ARC targets. The gdb change will be +in a separate patch though. + +The changes in this patch can be divided into: + +1) Introduction of "disassembler_options_arc ()" that will return a +"disasm_option_and_arg_t" structure representing the disassembly +options and their likely arguments. + +2) New data type "arc_options_arg_t" and new data "arc_options". +These are the internals for keeping track of options and arguments +entries that can easily be extended. + +3) To print the options, the "print_arc_disassembler_options ()" has +been adjusted to use this dynamically built structure instead of having +them hard-coded inside. + +To see this in effect, one can look into the output of: +$ ./binutils/objdump --help + ... + The following ARC specific disassembler options are... + ... + +include/ChangeLog: + + * dis-asm.h (disassembler_options_arc): New prototype. + +opcodes/ChangeLog: + + * arc-dis.c (arc_option_arg_t): New enumeration. + (arc_options): New variable. + (disassembler_options_arc): New function. + (print_arc_disassembler_options): Reimplement in terms of + "disassembler_options_arc". + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=8f467114435286e4f78b16fc1f5864acf6488fc0 +--- + include/ChangeLog | 4 + + include/dis-asm.h | 1 + opcodes/ChangeLog | 8 ++ + opcodes/arc-dis.c | 180 +++++++++++++++++++++++++++++++++++++++++++++--------- + 4 files changed, 166 insertions(+), 27 deletions(-) + +--- a/include/ChangeLog ++++ b/include/ChangeLog +@@ -1,3 +1,7 @@ ++2021-06-02 Shahab Vahedi ++ ++ * dis-asm.h (disassembler_options_arc): New prototype. ++ + 2020-09-12 H.J. Lu + + PR ld/26391 +--- a/include/dis-asm.h ++++ b/include/dis-asm.h +@@ -311,6 +311,7 @@ + extern void disassemble_init_s390 (struct disassemble_info *); + extern void disassemble_init_wasm32 (struct disassemble_info *); + extern void disassemble_init_nds32 (struct disassemble_info *); ++extern const disasm_options_and_args_t *disassembler_options_arc (void); + extern const disasm_options_and_args_t *disassembler_options_arm (void); + extern const disasm_options_and_args_t *disassembler_options_mips (void); + extern const disasm_options_and_args_t *disassembler_options_powerpc (void); +--- a/opcodes/ChangeLog ++++ b/opcodes/ChangeLog +@@ -1,3 +1,11 @@ ++2021-06-02 Shahab Vahedi ++ ++ * arc-dis.c (arc_option_arg_t): New enumeration. ++ (arc_options): New variable. ++ (disassembler_options_arc): New function. ++ (print_arc_disassembler_options): Reimplement in terms of ++ "disassembler_options_arc". ++ + 2020-10-22 Andrew Burgess + + * csky-dis.c (csky_get_disassembler): Don't return NULL when there +--- a/opcodes/arc-dis.c ++++ b/opcodes/arc-dis.c +@@ -1412,41 +1412,167 @@ + return print_insn_arc; + } + ++/* Indices into option argument vector for options that do require ++ an argument. Use ARC_OPTION_ARG_NONE for options that don't ++ expect an argument. */ ++typedef enum ++{ ++ ARC_OPTION_ARG_NONE = -1, ++ ARC_OPTION_ARG_ARCH, ++ ARC_OPTION_ARG_SIZE ++} arc_option_arg_t; ++ ++/* Valid ARC disassembler options. */ ++static struct ++{ ++ const char *name; ++ const char *description; ++ arc_option_arg_t arg; ++} arc_options[] = ++{ ++ { "cpu=", N_("Enforce the designated architecture while decoding."), ++ ARC_OPTION_ARG_ARCH }, ++ { "dsp", N_("Recognize DSP instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "spfp", N_("Recognize FPX SP instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "dpfp", N_("Recognize FPX DP instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "quarkse_em", N_("Recognize FPU QuarkSE-EM instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "fpuda", N_("Recognize double assist FPU instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "fpus", N_("Recognize single precision FPU instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "fpud", N_("Recognize double precision FPU instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "nps400", N_("Recognize NPS400 instructions."), ++ ARC_OPTION_ARG_NONE }, ++ { "hex", N_("Use only hexadecimal number to print immediates."), ++ ARC_OPTION_ARG_NONE } ++}; ++ ++/* Populate the structure for representing ARC's disassembly options. ++ Such a dynamic initialization is desired, because it makes the maintenance ++ easier and also gdb uses this to enable the "disassembler-option". */ ++ ++const disasm_options_and_args_t * ++disassembler_options_arc (void) ++{ ++ static disasm_options_and_args_t *opts_and_args; ++ ++ if (opts_and_args == NULL) ++ { ++ disasm_option_arg_t *args; ++ disasm_options_t *opts; ++ size_t i; ++ const size_t nr_of_options = ARRAY_SIZE (arc_options); ++ /* There is a null element at the end of CPU_TYPES, therefore ++ NR_OF_CPUS is actually 1 more and that is desired here too. */ ++ const size_t nr_of_cpus = ARRAY_SIZE (cpu_types); ++ ++ opts_and_args = XNEW (disasm_options_and_args_t); ++ opts_and_args->args ++ = XNEWVEC (disasm_option_arg_t, ARC_OPTION_ARG_SIZE + 1); ++ opts_and_args->options.name ++ = XNEWVEC (const char *, nr_of_options + 1); ++ opts_and_args->options.description ++ = XNEWVEC (const char *, nr_of_options + 1); ++ opts_and_args->options.arg ++ = XNEWVEC (const disasm_option_arg_t *, nr_of_options + 1); ++ ++ /* Populate the arguments for "cpu=" option. */ ++ args = opts_and_args->args; ++ args[ARC_OPTION_ARG_ARCH].name = "ARCH"; ++ args[ARC_OPTION_ARG_ARCH].values = XNEWVEC (const char *, nr_of_cpus); ++ for (i = 0; i < nr_of_cpus; ++i) ++ args[ARC_OPTION_ARG_ARCH].values[i] = cpu_types[i].name; ++ args[ARC_OPTION_ARG_SIZE].name = NULL; ++ args[ARC_OPTION_ARG_SIZE].values = NULL; ++ ++ /* Populate the options. */ ++ opts = &opts_and_args->options; ++ for (i = 0; i < nr_of_options; ++i) ++ { ++ opts->name[i] = arc_options[i].name; ++ opts->description[i] = arc_options[i].description; ++ if (arc_options[i].arg != ARC_OPTION_ARG_NONE) ++ opts->arg[i] = &args[arc_options[i].arg]; ++ else ++ opts->arg[i] = NULL; ++ } ++ opts->name[nr_of_options] = NULL; ++ opts->description[nr_of_options] = NULL; ++ opts->arg[nr_of_options] = NULL; ++ } ++ ++ return opts_and_args; ++} ++ ++ + void + print_arc_disassembler_options (FILE *stream) + { +- int i; ++ const disasm_options_and_args_t *opts_and_args; ++ const disasm_option_arg_t *args; ++ const disasm_options_t *opts; ++ size_t i, j; ++ size_t max_len = 0; ++ ++ opts_and_args = disassembler_options_arc (); ++ opts = &opts_and_args->options; ++ args = opts_and_args->args; + +- fprintf (stream, _("\n\ +-The following ARC specific disassembler options are supported for use \n\ +-with -M switch (multiple options should be separated by commas):\n")); ++ fprintf (stream, _("\nThe following ARC specific disassembler options are" ++ " supported for use \nwith the -M switch (multiple" ++ " options should be separated by commas):\n")); ++ ++ /* Find the maximum length for printing options (and their arg name). */ ++ for (i = 0; opts->name[i] != NULL; ++i) ++ { ++ size_t len = strlen (opts->name[i]); ++ len += (opts->arg[i]) ? strlen (opts->arg[i]->name) : 0; ++ max_len = (len > max_len) ? len : max_len; ++ } ++ ++ /* Print the options, their arg and description, if any. */ ++ for (i = 0, ++max_len; opts->name[i] != NULL; ++i) ++ { ++ fprintf (stream, " %s", opts->name[i]); ++ if (opts->arg[i] != NULL) ++ fprintf (stream, "%s", opts->arg[i]->name); ++ if (opts->description[i] != NULL) ++ { ++ size_t len = strlen (opts->name[i]); ++ len += (opts->arg[i]) ? strlen (opts->arg[i]->name) : 0; ++ fprintf (stream, ++ "%*c %s", (int) (max_len - len), ' ', opts->description[i]); ++ } ++ fprintf (stream, _("\n")); ++ } + +- /* cpu=... options. */ +- for (i = 0; cpu_types[i].name; ++i) ++ /* Print the possible values of an argument. */ ++ for (i = 0; args[i].name != NULL; ++i) + { +- /* As of now all value CPU values are less than 16 characters. */ +- fprintf (stream, " cpu=%-16s\tEnforce %s ISA.\n", +- cpu_types[i].name, cpu_types[i].isa); ++ size_t len = 3; ++ fprintf (stream, _("\n\ ++ For the options above, the following values are supported for \"%s\":\n "), ++ args[i].name); ++ for (j = 0; args[i].values[j] != NULL; ++j) ++ { ++ fprintf (stream, " %s", args[i].values[j]); ++ len += strlen (args[i].values[j]) + 1; ++ /* reset line if printed too long. */ ++ if (len >= 78) ++ { ++ fprintf (stream, _("\n ")); ++ len = 3; ++ } ++ } ++ fprintf (stream, _("\n")); + } + +- fprintf (stream, _("\ +- dsp Recognize DSP instructions.\n")); +- fprintf (stream, _("\ +- spfp Recognize FPX SP instructions.\n")); +- fprintf (stream, _("\ +- dpfp Recognize FPX DP instructions.\n")); +- fprintf (stream, _("\ +- quarkse_em Recognize FPU QuarkSE-EM instructions.\n")); +- fprintf (stream, _("\ +- fpuda Recognize double assist FPU instructions.\n")); +- fprintf (stream, _("\ +- fpus Recognize single precision FPU instructions.\n")); +- fprintf (stream, _("\ +- fpud Recognize double precision FPU instructions.\n")); +- fprintf (stream, _("\ +- nps400 Recognize NPS400 instructions.\n")); +- fprintf (stream, _("\ +- hex Use only hexadecimal number to print immediates.\n")); ++ fprintf (stream, _("\n")); + } + + void arc_insn_decode (bfd_vma addr, diff --git a/packages/gdb/10.2/0014-arc-Add-set-disassembler-options-support.patch b/packages/gdb/10.2/0014-arc-Add-set-disassembler-options-support.patch new file mode 100644 index 0000000..33bd62b --- /dev/null +++ b/packages/gdb/10.2/0014-arc-Add-set-disassembler-options-support.patch @@ -0,0 +1,3215 @@ +From 14cd09c12218b84581f269c0db905a64a67ee35b Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Wed, 5 May 2021 23:07:38 +0200 +Subject: [PATCH 17/20] arc: Add 'set disassembler-options' support + +Implement ARC target support for passing options to the disassembler +through the command interface. e.g.: + +gdb> set disassembler-options cpu=hs38_linux ... + +gdb/ChangeLog: + + * NEWS: Document 'set disassembler-options' support for the ARC + target. + * arc-tdep.c (arc_gdbarch_init): Set + 'gdbarch_valid_disassembler_options'. + +gdb/doc/ChangeLog: + + * gdb.texinfo (Source and Machine Code): Document 'set + disassembler-options' support for the ARC target. + +gdb/testsuite/ChangeLog: + + * gdb.arch/arc-disassembler-options.exp: New test. + * gdb.arch/arc-disassembler-options.s: New test source. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=ae61ef2c5615a06f829468b57249a17762a44220 +--- + gdb/ChangeLog | 7 + gdb/NEWS | 219 + + gdb/arc-tdep.c | 6 + gdb/doc/ChangeLog | 248 + + gdb/doc/gdb.texinfo | 4 + gdb/testsuite/ChangeLog | 2565 ++++++++++++++++++++ + gdb/testsuite/gdb.arch/arc-disassembler-options.exp | 45 + gdb/testsuite/gdb.arch/arc-disassembler-options.s | 21 + 8 files changed, 3111 insertions(+), 4 deletions(-) + create mode 100644 gdb/testsuite/gdb.arch/arc-disassembler-options.exp + create mode 100644 gdb/testsuite/gdb.arch/arc-disassembler-options.s + +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,3 +1,10 @@ ++2021-06-05 Shahab Vahedi ++ ++ * NEWS: Document 'set disassembler-options' support for the ARC ++ target. ++ * arc-tdep.c (arc_gdbarch_init): Set ++ 'gdbarch_valid_disassembler_options'. ++ + 2020-12-22 Shahab Vahedi + + * arc-linux-tdep.c: Replace "regnum" with "REGNUM" in comments. +--- a/gdb/NEWS ++++ b/gdb/NEWS +@@ -1,6 +1,225 @@ + What has changed in GDB? + (Organized release by release) + ++*** Changes since GDB 10 ++ ++* The 'set disassembler-options' command now supports specifying options ++ for the ARC target. ++ ++* GDB now supports general memory tagging functionality if the underlying ++ architecture supports the proper primitives and hooks. Currently this is ++ enabled only for AArch64 MTE. ++ ++ This includes: ++ ++ - Additional information when the inferior crashes with a SIGSEGV caused by ++ a memory tag violation. ++ ++ - A new modifier 'm' for the "x" command, which displays allocation tags for a ++ particular memory range. ++ ++ - Display of memory tag mismatches by "print", for addresses and ++ pointers, if memory tagging is supported by the architecture. ++ ++* Building GDB now requires GMP (The GNU Multiple Precision Arithmetic ++ Library). ++ ++* MI changes ++ ++ ** '-break-insert --qualified' and '-dprintf-insert --qualified' ++ ++ The MI -break-insert and -dprintf-insert commands now support a ++ new "--qualified" option that makes GDB interpret a specified ++ function name as a complete fully-qualified name. This is the ++ equivalent of the CLI's "break -qualified" and "dprintf ++ -qualified". ++ ++ ** '-break-insert --force-condition' and '-dprintf-insert --force-condition' ++ ++ The MI -break-insert and -dprintf-insert commands now support a ++ '--force-condition' flag to forcibly define a condition even when ++ the condition is invalid at all locations of the breakpoint. This ++ is equivalent to the '-force-condition' flag of the CLI's "break" ++ command. ++ ++ ** '-break-condition --force' ++ ++ The MI -break-condition command now supports a '--force' flag to ++ forcibly define a condition even when the condition is invalid at ++ all locations of the selected breakpoint. This is equivalent to ++ the '-force' flag of the CLI's "cond" command. ++ ++* GDB now supports core file debugging for x86_64 Cygwin programs. ++ ++* GDB will now look for the .gdbinit file in a config directory before ++ looking for ~/.gdbinit. The file is searched for in the following ++ locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit, ++ $HOME/.gdbinit. On Apple hosts the search order is instead: ++ $HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit. ++ ++* GDB now supports fixed point types which are described in DWARF ++ as base types with a fixed-point encoding. Additionally, support ++ for the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also ++ been added. ++ ++ For Ada, this allows support for fixed point types without requiring ++ the use of the GNAT encoding (based on information added to the type's ++ name following a GNAT-specific format). ++ ++* GDB will now load and process commands from ~/.config/gdb/gdbearlyinit ++ or ~/.gdbearlyinit if these files are present. These files are ++ processed earlier than any of the other initialization files and ++ can affect parts of GDB's startup that previously had already been ++ completed before the initialization files were read, for example ++ styling of the initial GDB greeting. ++ ++* GDB now has two new options "--early-init-command" and ++ "--early-init-eval-command" with corresponding short options "-eix" ++ and "-eiex" that allow options (that would normally appear in a ++ gdbearlyinit file) to be passed on the command line. ++ ++* New commands ++ ++set debug event-loop ++show debug event-loop ++ Control the display of debug output about GDB's event loop. ++ ++set print memory-tag-violations ++show print memory-tag-violations ++ Control whether to display additional information about memory tag violations ++ when printing pointers and addresses. Architecture support for memory ++ tagging is required for this option to have an effect. ++ ++maintenance flush symbol-cache ++maintenance flush register-cache ++ These new commands are equivalent to the already existing commands ++ 'maintenance flush-symbol-cache' and 'flushregs' respectively. ++ ++maintenance flush dcache ++ A new command to flush the dcache. ++ ++maintenance info target-sections ++ Print GDB's internal target sections table. ++ ++memory-tag show-logical-tag POINTER ++ Print the logical tag for POINTER. ++memory-tag with-logical-tag POINTER TAG ++ Print POINTER with logical tag TAG. ++memory-tag show-allocation-tag ADDRESS ++ Print the allocation tag for ADDRESS. ++memory-tag set-allocation-tag ADDRESS LENGTH TAGS ++ Set the allocation tag for [ADDRESS, ADDRESS + LENGTH) to TAGS. ++memory-tag check POINTER ++ Validate that POINTER's logical tag matches the allocation tag. ++ ++set startup-quietly on|off ++show startup-quietly ++ When 'on', this causes GDB to act as if "-silent" were passed on the ++ command line. This command needs to be added to an early ++ initialization file (e.g. ~/.config/gdb/gdbearlyinit) in order to ++ affect GDB. ++ ++set print type hex on|off ++show print type hex ++ When 'on', the 'ptype' command uses hexadecimal notation to print sizes ++ and offsets of struct members. When 'off', decimal notation is used. ++ ++set python ignore-environment on|off ++show python ignore-environment ++ When 'on', this causes GDB's builtin Python to ignore any ++ environment variables that would otherwise affect how Python ++ behaves. This command needs to be added to an early initialization ++ file (e.g. ~/.config/gdb/gdbearlyinit) in order to affect GDB. ++ ++set python dont-write-bytecode auto|on|off ++show python dont-write-bytecode ++ When 'on', this causes GDB's builtin Python to not write any ++ byte-code (.pyc files) to disk. This command needs to be added to ++ an early initialization file (e.g. ~/.config/gdb/gdbearlyinit) in ++ order to affect GDB. When 'off' byte-code will always be written. ++ When set to 'auto' (the default) Python will check the ++ PYTHONDONTWRITEBYTECODE environment variable. ++ ++* Changed commands ++ ++break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM] ++ [-force-condition] [if CONDITION] ++ This command would previously refuse setting a breakpoint if the ++ CONDITION expression is invalid at a location. It now accepts and ++ defines the breakpoint if there is at least one location at which ++ the CONDITION is valid. The locations for which the CONDITION is ++ invalid, are automatically disabled. If CONDITION is invalid at all ++ of the locations, setting the breakpoint is still rejected. However, ++ the '-force-condition' flag can be used in this case for forcing GDB to ++ define the breakpoint, making all the current locations automatically ++ disabled. This may be useful if the user knows the condition will ++ become meaningful at a future location, e.g. due to a shared library ++ load. ++ ++condition [-force] N COND ++ The behavior of this command is changed the same way for the 'break' ++ command as explained above. The '-force' flag can be used to force ++ GDB into defining the condition even when COND is invalid for all the ++ current locations of breakpoint N. ++ ++flushregs ++maintenance flush-symbol-cache ++ These commands are deprecated in favor of the new commands ++ 'maintenance flush register-cache' and 'maintenance flush ++ symbol-cache' respectively. ++ ++set style version foreground COLOR ++set style version background COLOR ++set style version intensity VALUE ++ Control the styling of GDB's version number text. ++ ++inferior [ID] ++ When the ID parameter is omitted, then this command prints information ++ about the current inferior. When the ID parameter is present, the ++ behavior of the command is unchanged and have the inferior ID become ++ the current inferior. ++ ++maintenance info sections ++ The ALLOBJ keyword has been replaced with an -all-objects command ++ line flag. It is now possible to filter which sections are printed ++ even when -all-objects is passed. ++ ++ptype[/FLAGS] TYPE | EXPRESSION ++ The 'ptype' command has two new flags. When '/x' is set, hexadecimal ++ notation is used when printing sizes and offsets of struct members. ++ When '/d' is set, decimal notation is used when printing sizes and ++ offsets of struct members. Default behavior is given by 'show print ++ type hex'. ++ ++* Removed targets and native configurations ++ ++ARM Symbian arm*-*-symbianelf* ++ ++* New remote packets ++ ++qMemTags ++ Request the remote to send allocation tags for a particular memory range. ++QMemTags ++ Request the remote to store the specified allocation tags to the requested ++ memory range. ++ ++* Guile API ++ ++ ** Improved support for rvalue reference values: ++ TYPE_CODE_RVALUE_REF is now exported as part of the API and the ++ value-referenced-value procedure now handles rvalue reference ++ values. ++ ++ ** New procedures for obtaining value variants: ++ value-reference-value, value-rvalue-reference-value and ++ value-const-value. ++ ++* Python API ++ ++ ** Inferior objects now contain a read-only 'connection_num' attribute that ++ gives the connection number as seen in 'info connections' and ++ 'info inferiors'. ++ + *** Changes in GDB 10 + + * There are new feature names for ARC targets: "org.gnu.gdb.arc.core" +--- a/gdb/arc-tdep.c ++++ b/gdb/arc-tdep.c +@@ -2464,11 +2464,13 @@ + arc_disassembler_options = NULL; + break; + } +- set_gdbarch_disassembler_options (gdbarch, +- &arc_disassembler_options); + } + } + ++ set_gdbarch_disassembler_options (gdbarch, &arc_disassembler_options); ++ set_gdbarch_valid_disassembler_options (gdbarch, ++ disassembler_options_arc ()); ++ + tdesc_use_registers (gdbarch, tdesc, tdesc_data); + + return gdbarch; +--- a/gdb/doc/ChangeLog ++++ b/gdb/doc/ChangeLog +@@ -1,3 +1,251 @@ ++2021-06-05 Shahab Vahedi ++ ++ * gdb.texinfo (Source and Machine Code): Document 'set ++ disassembler-options' support for the ARC target. ++ ++2021-06-04 Hannes Domani ++ ++ * python.texi (TUI Windows In Python): Document Window.click. ++ ++2021-05-29 Hannes Domani ++ ++ * python.texi (Writing a Frame Filter): Fix example. ++ ++2021-05-27 Hannes Domani ++ ++ * python.texi (TUI Windows In Python): Document "full_window" ++ argument. ++ ++2021-05-27 Hannes Domani ++ ++ * python.texi (Symbols In Python): Document gdb.SYMBOL_LOC_LABEL. ++ ++2021-05-25 Hannes Domani ++ ++ * python.texi (Symbols In Python): Fix gdb.SYMBOL_LOC_COMMON_BLOCK. ++ ++2021-05-24 Andrew Burgess ++ ++ * gdb.texi (Initialization Files): Add '@:' after 'e.g.'. ++ (Source Path): Likewise. ++ (GDB/MI Development and Front Ends): Likewise. ++ (ARM Features): Likewise. ++ (gdb man): Likewise. ++ ++2021-05-14 Tankut Baris Aktemur ++ ++ * python.texi (Inferiors In Python): Mention the 'connection_num' ++ attribute. ++ ++2021-05-12 George Barrett ++ ++ * guile.texi (Values From Inferior In Guile): Add documentation ++ for value-const-value. ++ ++2021-05-12 George Barrett ++ ++ * guile.texi (Values From Inferior In Guile): Add documentation ++ for value-reference-value. Add documentation for ++ value-rvalue-reference-value. ++ ++2021-05-12 George Barrett ++ ++ * guile.texi (Types In Guile): Add documentation for ++ TYPE_CODE_RVALUE_REF. ++ ++2021-05-10 Andrew Burgess ++ ++ * guile.texinfo (Breakpoints In Guile): Reword sentence. ++ * python.texinfo (Breakpoints In Python): Reword sentence. ++ ++2021-05-09 Andrew Burgess ++ ++ * python.texinfo (Python Commands): Document 'set debug ++ py-unwind' and 'show debug py-unwind'. ++ ++2021-05-09 Andrew Burgess ++ ++ * python.texinfo (Python Commands): Document 'set debug ++ py-breakpoint' and 'show debug py-breakpoint'. ++ ++2021-05-06 Tankut Baris Aktemur ++ ++ * gdb.texinfo (GDB/MI Breakpoint Commands): Mention the ++ '--force' flag of the '-break-condition' command. ++ ++2021-05-06 Tankut Baris Aktemur ++ ++ * gdb.texinfo (GDB/MI Breakpoint Commands): Mention the ++ '--force-condition' flag of the '-break-insert' and ++ '-dprintf-insert' commands. ++ ++2021-05-04 Simon Marchi ++ ++ * python.texi (Types In Python): Re-organize Type.fields doc. ++ Mention handling of array types. Correct doc for when calling ++ the method on another type. ++ ++2021-04-28 Andrew Burgess ++ ++ * gdb.texinfo (Initialization Files): Use @env when referencing ++ environment variables. ++ (Shell Commands): Likewise. ++ (Starting): Likewise. ++ (Arguments): Likewise. ++ (Environment): Likewise. ++ (Edit): Likewise. ++ (Compiling and Injecting Code): Likewise. ++ (Files): Likewise. ++ (Command History): Likewise. ++ (Screen Size): Likewise. ++ (Emacs): Likewise. ++ ++2021-04-28 Andrew Burgess ++ ++ * python.texinfo (Python Commands): Mention new commands. ++ ++2021-04-25 Lancelot Six ++ ++ PR gdb/22640 ++ * gdb.texinfo (Symbols): Describe the 'x' and 'd' flags of the ++ ptype command, describe 'set print type hex' and 'show print ++ type hex' commands. Update 'ptype/o' examples. ++ ++2021-04-21 Tankut Baris Aktemur ++ ++ * gdb.texinfo (GDB/MI Breakpoint Information): Update the ++ description for the 'enabled' field of breakpoint locations. ++ ++2021-04-15 Tom Tromey ++ Andrew Burgess ++ ++ * gdb.texinfo (Mode Options): Mention "set startup-quietly". ++ ++2021-04-15 Andrew Burgess ++ ++ PR cli/25956 ++ * gdb.texinfo (File Options): Mention new command line options. ++ (Startup): Discuss when early init files are processed. ++ (Initialization Files): Add description of early init files. ++ (Output Styling): Update description of 'version' style. ++ (gdb man): Mention early init files. ++ ++2021-04-14 Andrew Burgess ++ ++ * gdb.texinfo (GDB/MI Miscellaneous Commands): Add missing ++ parentheses to GDB prompt in example, and replace '(gdb)' with ++ '(@value{GDBP})' in one example where the latter was already in ++ use. ++ ++2021-03-29 Luis Machado ++ ++ * gdb.textinfo (Memory Tagging): Make it a @section. ++ ++2021-03-24 Luis Machado ++ ++ * gdb.texinfo (Data): Document memory tagging changes to the "print" ++ command. ++ (Examining Memory): Document memory tagging changes to the "x" ++ command. ++ (Memory Tagging): Update with more information on changes to the "x" ++ and "print" commands. ++ ++2021-03-24 Luis Machado ++ ++ * gdb.texinfo (Memory Tagging): New subsection and node. ++ (AArch64 Memory Tagging Extension): New subsection. ++ ++2021-03-24 Luis Machado ++ ++ * gdb.texinfo (General Query Packets): Document qMemTags and ++ QMemTags. Document the "memory-tagging" feature. ++ (ARM-Specific Protocol Details): Document memory tag types. ++ ++2021-03-18 Andrew Burgess ++ ++ * python.texinfo (Parameters In Python): Return empty string in ++ small example code. ++ ++2021-02-24 Andrew Burgess ++ ++ * gdb.texinfo (Files): Document new 'maint info target-sections' ++ command. ++ ++2021-02-17 Lancelot Six ++ ++ PR cli/17290 ++ * gdb.texinfo (Remote Configuration): Fix show remote ++ interrupt-sequence and show remote interrupt-on-connect. ++ ++2021-02-11 Andrew Burgess ++ ++ * gdb.texinfo (Files): Update documentation for 'maint info ++ sections'. ++ ++2021-02-08 Andrew Burgess ++ ++ * python.texinfo (TUI Windows In Python): Extend description of ++ TuiWindow.is_valid. ++ ++2021-02-02 Lancelot SIX ++ ++ * gdb.texinfo (Inferiors Connections and Programs): Document the ++ inferior command when used without argument. ++ ++2021-01-27 Tom Tromey ++ ++ * gdb.texinfo (Auto-loading extensions): Remove extraneous space. ++ ++2021-01-25 Marco Barisione ++ ++ * python.texi: Add parentheses to print statements/functions. ++ ++2021-01-25 Andrew Burgess ++ ++ * gdb.texinfo (Specify Location): Move menu to the end of the ++ node. ++ (Auto-loading): Likewise. ++ (Extending GDB): Likewise. ++ (TUI): Likewise. ++ (Operating System Information): Likewise. ++ ++2021-01-22 Andrew Burgess ++ ++ PR cli/25956 ++ * gdb.texinfo (Output Styling): Document version style. ++ ++2021-01-22 Andrew Burgess ++ ++ * gdb.texinfo (Auto-loading extensions): Add additional cross ++ references and move @menu to the end of the node. ++ ++2021-01-22 Andrew Burgess ++ ++ * gdb.texinfo (Aliases): Move @menu to the end of the node. ++ ++2021-01-22 Andrew Burgess ++ ++ * gdb.texinfo (PowerPC Embedded): Down case contents of @var. ++ ++2021-01-21 Andrew Burgess ++ ++ * gdb.texinfo (Commands): Update menu. ++ (Extending GDB): Likewise. ++ (Command aliases default args): Moved later into the document, ++ added a cindex entry. Renamed the section 'Automatically prepend ++ default arguments to user-defined aliases' to 'Default Arguments'. ++ (Aliases): Moved earlier in the document. Minor rewording of the ++ first paragraph, down-cased the text inside all uses of @var, and ++ added a cross reference to the Python code. Renamed the section ++ 'Creating new spellings of existing commands' to 'Command ++ Aliases'. ++ ++2021-01-21 Hannes Domani ++ ++ PR python/19151 ++ * python.texi (Breakpoints In Python): Document ++ gdb.BP_HARDWARE_BREAKPOINT. ++ + 2021-01-01 Joel Brobecker + + * gdb.texinfo, refcard.tex: Update copyright year range. +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -9717,8 +9717,8 @@ + + If it is necessary to specify more than one disassembler option, then + multiple options can be placed together into a comma separated list. +-Currently this command is only supported on targets ARM, MIPS, PowerPC +-and S/390. ++Currently this command is only supported on targets ARC, ARM, MIPS, ++PowerPC and S/390. + + @kindex show disassembler-options + @item show disassembler-options +--- a/gdb/testsuite/ChangeLog ++++ b/gdb/testsuite/ChangeLog +@@ -1,7 +1,2572 @@ ++2021-06-05 Shahab Vahedi ++ ++ * gdb.arch/arc-disassembler-options.exp: New test. ++ * gdb.arch/arc-disassembler-options.s: New test source. ++ ++2021-06-04 Tom Tromey ++ ++ * gdb.ada/array_of_symbolic_length.exp: New file. ++ * gdb.ada/array_of_symbolic_length/foo.adb: New file. ++ * gdb.ada/array_of_symbolic_length/gl.adb: New file. ++ * gdb.ada/array_of_symbolic_length/gl.ads: New file. ++ * gdb.ada/array_of_symbolic_length/pck.adb: New file. ++ * gdb.ada/array_of_symbolic_length/pck.ads: New file. ++ ++2021-06-03 Magne Hov ++ ++ PR python/27841 ++ * gdb.python/py-events.exp: Extend inferior exit tests. ++ * gdb.python/py-events.py: Print inferior exit PID. ++ ++2021-06-03 Hannes Domani ++ ++ * gdb.python/py-symbol.exp: Test symbol constants. ++ ++2021-06-02 Bernd Edlinger ++ ++ * gdb.dwarf2/per-bfd-sharing.exp: Fix temp-dir leakage. ++ ++2021-06-02 Carl Love ++ ++ * gdb.threads/threadapply.c: Add global mybarrier. ++ (main): Add pthread_barrier_init. ++ (thread_function): Replace while loop with myp increment and ++ pthread_barrier_wait. ++ ++2021-06-02 Andrew Burgess ++ ++ * lib/gdb.exp (gdb_compile): Only add the -J option when using a ++ gcc based Fortran compiler, for example, flang does not support ++ this option. ++ ++2021-06-02 Andrew Burgess ++ ++ * lib/fortran.exp (fortran_int8): Escape '*' in pattern. ++ ++2021-06-01 Tom Tromey ++ ++ * Makefile.in (all): Don't print anything. ++ ($(abs_builddir)/site.exp site.exp): Use $(ECHO_GEN). ++ (expect-read1): Likewise. ++ (read1.so): Use $(ECHO_CC). ++ Include silent-rules.mk. ++ ++2021-06-01 Tom Tromey ++ ++ * aclocal.m4, configure.ac, configure: Remove. ++ * Makefile.in (EXTRA_RULES): Remove. ++ ($(abs_builddir)/site.exp site.exp): Don't depend on ++ config.status. ++ (distclean maintainer-clean realclean, Makefile): Update. ++ (config.status): Remove target. ++ (lib/pdtrace): New target. ++ (all): Don't depend on EXTRA_RULES. ++ (check-read1): Depend on read1.so, expect-read1. ++ ++2021-06-01 Tom de Vries ++ ++ PR symtab/26096 ++ * gdb.cp/cold-clone.cc: New test. ++ * gdb.cp/cold-clone.exp: New file. ++ ++2021-06-01 Andrew Burgess ++ ++ * gdb.gdb/unittest.c: New file. ++ * gdb.gdb/unittest.exp: Run with and without a binary file loaded ++ into GDB. ++ ++2021-06-01 Andrew Burgess ++ ++ * gdb.base/premature-dummy-frame-removal.c: New file. ++ * gdb.base/premature-dummy-frame-removal.exp: New file. ++ * gdb.base/premature-dummy-frame-removal.py: New file. ++ ++2021-05-27 Simon Marchi ++ ++ * gdb.base/reverse-init-functions.exp: New. ++ ++2021-05-27 Tom de Vries ++ ++ PR symtab/27919 ++ PR testsuite/27920 ++ * gdb.dwarf2/dw2-dummy-cu.exp: Use maint expand-symtabs instead of ++ -readnow. ++ ++2021-05-27 Tom de Vries ++ ++ PR testsuite/27921 ++ * gdb.dwarf2/gdb-index.exp (add_gdb_index): Rename to ... ++ (local_add_gdb_index): ... this. ++ ++2021-05-21 Tom de Vries ++ ++ PR testsuite/25047 ++ * boards/cc-with-gnu-debuglink.exp: New file. ++ ++2021-05-21 Tankut Baris Aktemur ++ ++ * gdb.dwarf2/dw2-inline-with-lexical-scope.c (func): Replace ++ a dead code with an assignment to a global var. Fix a ++ whitespacing problem around an assignment operator. ++ ++2021-05-19 Will Schmidt ++ ++ * gdb.arch/powerpc64-prologue.c: New test to exercise prologues ++ for the powerpc64 LE target. ++ * gdb.arch/powerpc-prologue.exp: Test Harness. ++ ++2021-05-19 Andrew Burgess ++ ++ * gdb.guile/scm-pretty-print.exp: Add test names to resolve ++ duplicate test names. ++ ++2021-05-19 Tom de Vries ++ ++ * gdb.base/info-types.exp.tcl: Scan info types output line-by-line. ++ ++2021-05-17 Simon Marchi ++ ++ * gdb.python/py-framefilter-gdb.py.in: Rename to: ++ * gdb.python/py-framefilter-gdb.py: ... this. ++ * gdb.python/py-framefilter-invalidarg-gdb.py.in: Rename to: ++ * gdb.python/py-framefilter-invalidarg-gdb.py: ... this. ++ ++2021-05-17 Simon Marchi ++ ++ * gdb.python/py-framefilter-gdb.py.in: Re-format. ++ * gdb.python/py-framefilter-invalidarg-gdb.py.in: Re-format. ++ ++2021-05-17 Bhuvanendra Kumar N ++ ++ * gdb.base/class-allocatable-array.exp: Modified test for clang. ++ ++2021-05-16 Weimin Pan ++ ++ * gdb.ctf/funcreturn.exp: New file. ++ * gdb.ctf/whatis.c: Copy from gdb.base. ++ ++2021-05-14 Tom Tromey ++ ++ * gdb.rust/pp.exp: New file. ++ * gdb.rust/pp.py: New file. ++ * gdb.rust/pp.rs: New file. ++ ++2021-05-14 Bernd Edlinger ++ ++ * gdb.base/index-cache.exp: Cleanup $cache_dir/*.gdb-index and ++ remove the directory. ++ * gdb.dwarf2/per-bfd-sharing.exp: Likewise. ++ ++2021-05-14 Tankut Baris Aktemur ++ ++ * gdb.python/py-inferior.exp: Add test cases for 'connection_num'. ++ ++2021-05-14 Kent Cheung ++ Andrew Burgess ++ ++ * gdb.python/py-format-string.c: Added a variable to test. ++ * gdb.python/py-format-string.exp: Check string representation is ++ printed at appropriate max_depth settings. ++ * gdb.python/py-nested-maps.exp: Likewise. ++ * gdb.guile/scm-pretty-print.exp: Add additional tests. ++ ++2021-05-13 Andrew Burgess ++ ++ * gdb.guile/scm-pretty-print.exp (run_lang_tests): Give some tests ++ unique names, also wrap proc body in with_test_prefix. ++ ++2021-05-13 Andrew Burgess ++ ++ * gdb.guile/scm-frame-args.exp: Add with_test_prefix to resolve ++ duplicate test names. ++ * gdb.guile/scm-parameter.exp: Provide test names to avoid ++ duplicate names based on the command being run. ++ * gdb.guile/scm-symbol.exp: Extend test name to make it unique. ++ * gdb.guile/scm-type.exp (restart_gdb): Don't print PASS line when ++ loading a support module. ++ (test_equality): Update test name to match the actual test, making ++ the name unique in the process. ++ * gdb.guile/scm-value.exp (test_value_in_inferior): Add test names ++ to resolve duplicate tests. ++ (test_inferior_function_call): Likewise. ++ (test_subscript_regression): Likewise. ++ ++2021-05-13 Andrew Burgess ++ ++ * lib/guile.exp (gdb_scm_load_file): Use empty test name to ++ silence PASS lines. ++ (gdb_install_guile_module): Likewise. ++ ++2021-05-12 George Barrett ++ ++ * gdb.guile/scm-value.exp (test_value_in_inferior): Add test for ++ value-const-value. ++ ++2021-05-12 George Barrett ++ ++ * gdb.guile/scm-value.exp (test_value_in_inferior): Add test for ++ value-reference-value. Add test for value-rvalue-reference-value. ++ ++2021-05-11 Tom de Vries ++ ++ * gdb.base/watch_thread_num.exp: Fix "set debug infrun 1" FAILs. ++ Add "set debug infrun 1" commented out. ++ ++2021-05-11 Tom de Vries ++ ++ * gdb.base/gdb-sigterm.exp: Fix exp_continue regexp. ++ ++2021-05-11 Bhuvanendra Kumar ++ ++ * gdb.fortran/array-element.exp: Breakpoint location is modified. ++ ++2021-05-10 Lancelot Six ++ ++ PR gdb/27614 ++ * gdb.dwarf2/gdb-add-index-symlink.exp: New test. ++ ++2021-05-10 Andrew Burgess ++ ++ * gdb.guile/guile.exp: Don't use the source directory as a ++ temporary HOME directory. ++ ++2021-05-10 Simon Marchi ++ ++ * gdb.arch/amd64-osabi.exp (test_osabi_none): Use the ++ parameters. ++ ++2021-05-07 Andrew Burgess ++ ++ * gdb.guile/guile.exp: Add an extra test. ++ ++2021-05-07 Andrew Burgess ++ ++ * gdb.base/ptype-offsets.exp: Replace use of send_gdb with ++ gdb_test_no_output. ++ ++2021-05-07 Simon Marchi ++ ++ * Re-format all Python files using black. ++ * gdb.python/py-prettyprint.exp (run_lang_tests): Adjust. ++ ++2021-05-06 Andrew Burgess ++ ++ * gdb.guile/scm-breakpoint.exp (test_watchpoints): Print the ++ watchpoint object before and after registering it with GDB. ++ ++2021-05-06 Andrew Burgess ++ ++ * gdb.guile/scm-breakpoint.exp (test_bkpt_basic): Convert to ++ 'proc_with_prefix', remove use of 'with_test_prefix', and ++ reindent. ++ (test_bkpt_deletion): Likewise. ++ (test_bkpt_cond_and_cmds): Likewise. ++ (test_bkpt_invisible): Likewise. ++ (test_watchpoints): Likewise. ++ (test_bkpt_internal): Likewise. ++ (test_bkpt_eval_funcs): Likewise. ++ (test_bkpt_registration): Likewise. ++ (test_bkpt_address): Convert to 'proc_with_prefix'. ++ (test_bkpt_probe): Likewise. ++ ++2021-05-06 Andrew Burgess ++ ++ * gdb.guile/scm-breakpoint.exp (test_bkpt_basic): Extend test ++ names to avoid duplicates. ++ (test_bkpt_cond_and_cmds): Likewise. ++ (test_bkpt_eval_funcs): Likewise. ++ ++2021-05-06 Tankut Baris Aktemur ++ ++ * gdb.mi/mi-break.exp (test_forced_conditions): Add a test ++ for the -break-condition command's "--force" flag. ++ ++2021-05-06 Tankut Baris Aktemur ++ ++ * gdb.mi/mi-break.exp (test_forced_conditions): New proc that ++ is called by the test. ++ ++2021-05-05 Tom de Vries ++ ++ * gdb.threads/detach-step-over.exp: Do exp_continue when encountering ++ "Reading symbols" or "Expanding full symbols" lines. Using timeout ++ factor of 2 for attach. ++ ++2021-05-05 Tom de Vries ++ ++ * gdb.threads/fork-plus-threads.exp: Handle "New LWP " and ++ "LWP exited" messages. ++ ++2021-05-04 Simon Marchi ++ ++ * gdb.python/py-type.exp (test_fields): Test calling fields on ++ an int type. ++ ++2021-05-04 Simon Marchi ++ ++ * gdb.python/flexible-array-member.exp: Adjust expected range ++ value for member declared with 0 size. Test accessing range ++ tuple through range type. ++ ++2021-05-03 Andrew Burgess ++ ++ PR testsuite/27788 ++ * gdb.python/py-startup-opt.exp (test_python_settings): Change the ++ expected results when environment variable PYTHONDONTWRITEBYTECODE ++ is set. ++ ++2021-04-30 Tom Tromey ++ ++ * gdb.ada/enum_idx_packed/pck.ads (My_Enum, My_Array_Type) ++ (Confused_Array): New types. ++ * gdb.ada/enum_idx_packed/foo.adb (Confused_Array): New variable. ++ * gdb.ada/enum_idx_packed.exp: Add new tests. ++ ++2021-04-30 Tom de Vries ++ ++ * gdb.mi/mi-sym-info.exp: Add with_timeout_factor, and increase ++ existing timeout factors. ++ ++2021-04-30 Tom de Vries ++ ++ * gdb.mi/mi-sym-info.exp: Remove duplicate test. ++ ++2021-04-29 Tom de Vries ++ ++ PR testsuite/27786 ++ * lib/valgrind.exp (vgdb_start): Use set_remotetimeout. Increase ++ remotetimeout to 4. ++ ++2021-04-28 Tom Tromey ++ ++ * gdb.ada/null_overload.exp: New file. ++ * gdb.ada/null_overload/foo.adb: New file. ++ ++2021-04-28 Andrew Burgess ++ ++ * gdb.python/py-startup-opt.exp: New file. ++ ++2021-04-27 Luis Machado ++ ++ * gdb.base/maint.exp: Drop a pattern that is not needed. ++ * lib/gdb.exp (readnow): Match line-by-line. ++ ++2021-04-27 Luis Machado ++ ++ * gdb.xml/tdesc-reload.exp: Pass -lbl. ++ ++2021-04-27 Michael Weghorn ++ Simon Marchi ++ ++ * gdb.python/libpy-autoloaded-pretty-printers-in-newobjfile-event.so-gdb.py: New test. ++ * gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event-lib.cc: New test. ++ * gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event-lib.h: New test. ++ * gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event-main.cc: New test. ++ * gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp: New test. ++ * gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.py: New test. ++ ++2021-04-26 Tom Tromey ++ ++ PR gdb/27743: ++ * gdb.dwarf2/imported-unit-bp.exp: New file. ++ * gdb.dwarf2/imported-unit-bp-main.c: New file. ++ * gdb.dwarf2/imported-unit-bp-alt.c: New file. ++ ++2021-04-26 Simon Marchi ++ ++ PR gdb/27773 ++ * gdb.base/dump.exp: Test dump to non-existent dir. ++ ++2021-04-26 Luis Machado ++ ++ * gdb.arch/aarch64-dbreg-contents.c (set_watchpoint): Fix arch level ++ comparison. ++ ++2021-04-25 Lancelot Six ++ ++ PR gdb/22640 ++ * gdb.base/ptype-offsets.exp: Add tests to verify the behavior ++ of 'ptype/ox' and 'ptype/od'. Check that 'set print type hex' ++ changes the default behavior of 'ptype/o'. Update to take into ++ account new horizontal layout. ++ * gdb.rust/simple.exp: Update ptype test to check new horizontal ++ layout. ++ * gdb.rust/union.exp: Same. ++ ++2021-04-23 Andrew Burgess ++ ++ * gdb.base/info_sources.exp: Add new tests. ++ ++2021-04-22 Tom Tromey ++ ++ * gdb.base/ptype-offsets.cc (struct empty_member): New. ++ (main): Use empty_member. ++ * gdb.base/ptype-offsets.exp: Add new test. ++ + 2021-04-22 Simon Marchi + + * gdb.python/flexible-array-member.exp: Add check for Python + support. ++ ++2021-04-22 Simon Marchi ++ ++ PR gdb/27757 ++ * gdb.python/flexible-array-member.c: New test. ++ * gdb.python/flexible-array-member.exp: New test. ++ * gdb.guile/scm-type.exp (test_range): Add test for flexible ++ array member. ++ * gdb.guile/scm-type.c (struct flex_member): New. ++ (main): Use it. ++ ++2021-04-22 Tom Tromey ++ ++ * gdb.rust/modules.exp: Add checks for syntax errors. ++ * gdb.rust/expr.exp: Add checks for syntax errors. ++ * gdb.rust/simple.exp: Add checks for syntax errors. ++ ++2021-04-21 Carl Love ++ ++ * gdb.base/valgrind-bt.exp: Add gdb_test "break main". ++ Update expected string for gdb_test "bt". ++ ++ * lib/valgrind.exp: Add set remotetimeout 3. ++ Increase vgdb wait from 1 to 2. ++ Add max-invoke-ms option to vgdb command line. ++ ++2021-04-21 Tankut Baris Aktemur ++ ++ * gdb.mi/mi-break.exp: Extend with checks for invalid breakpoint ++ conditions. ++ ++2021-04-21 Simon Marchi ++ Tankut Baris Aktemur ++ ++ * gdb.mi/mi-break.exp: Fix the duplicate test names. ++ ++2021-04-20 Felix Willgerodt ++ ++ * gdb.base/address_space_qualifier.exp: New file. ++ ++2021-04-19 Tom Tromey ++ ++ PR gdb/27742: ++ * gdb.opt/inline-locals.exp: Update kfail patterns. ++ ++2021-04-17 Tom Tromey ++ ++ * gdb.dwarf2/gdb-index-nodebug.exp: New file. ++ ++2021-04-16 Tom Tromey ++ ++ * gdb.rust/simple.exp: Change error text. ++ * gdb.rust/expr.exp: Change error text. ++ ++2021-04-16 Tom Tromey ++ ++ * gdb.rust/simple.exp: Add parens to 'as' test. ++ ++2021-04-16 Simon Marchi ++ ++ * boards/simavr.exp: Set debug_flags. ++ ++2021-04-16 Luis Machado ++ ++ * gdb.dwarf2/dw2-bfloat16.exp: New file. ++ ++2021-04-15 Andrew Burgess ++ ++ * gdb.python/py-parameter.exp: Give a test a proper name to avoid ++ including a path in the test name. ++ ++2021-04-15 Simon Marchi ++ ++ * gdb.threads/fork-plus-threads.exp: Use foreach_with_prefix. ++ ++2021-04-15 Tom Tromey ++ ++ * gdb.dwarf2/arr-stride.exp: Add test. ++ ++2021-04-15 Andrew Burgess ++ ++ * gdb.base/startup-file.exp: Add more tests. ++ ++2021-04-15 Andrew Burgess ++ ++ PR cli/25956 ++ * gdb.base/early-init-file.c: New file. ++ * gdb.base/early-init-file.exp: New file. ++ * lib/gdb-utils.exp (style): Handle style 'none'. ++ ++2021-04-14 Tankut Baris Aktemur ++ ++ * gdb.dwarf2/dw2-inline-with-lexical-scope.exp: Use ++ @DW_INL_declared_inlined for the inline attribute. ++ ++2021-04-14 Tankut Baris Aktemur ++ ++ * gdb.opt/inline-locals.c (scoped): New function. ++ (main): Call 'scoped'. ++ * gdb.opt/inline-locals.exp: Update with "info locals" tests ++ for scoped variables. ++ * gdb.dwarf2/dw2-inline-with-lexical-scope.c: New file. ++ * gdb.dwarf2/dw2-inline-with-lexical-scope.exp: New file. ++ ++2021-04-14 Tankut Baris Aktemur ++ ++ * lib/dwarf.exp (_location): Recognize DW_OP_fbreg as an op. ++ ++2021-04-12 Will Schmidt ++ ++ * gdb.arch/powerpc-vsx-regs.exp: Initialize vs* doublewords. ++ ++2021-04-12 Will Schmidt ++ ++ * gdb.arch/powerpc-plxv-nonrel.s: Testcase using ++ non-relative plxv instructions. ++ * gdb.arch/powerpc-plxv-nonrel.exp: Testcase harness. ++ ++2021-03-31 Will Schmidt ++ ++ PR gdb/27525 ++ * gdb/testsuite/gdb.arch/powerpc-addpcis.exp: Testcase harness to ++ exercise single-stepping over subpcis,lnia,addpcis instructions ++ with displacement. ++ * gdb/testsuite/gdb.arch/powerpc-addpcis.s: Testcase with stream ++ of addpcis/lnia/subpcis instructions. ++ * gdb/testsuite/gdb.arch/powerpc-lnia.exp: Testcase harness to ++ exercise single-stepping over lnia instructions with displacement. ++ * gdb/testsuite/gdb.arch/powerpc-lnia.s: Testcase with stream of ++ lnia instructions. ++ ++2021-03-31 Will Schmidt ++ ++ * gdb.arch/powerpc-power10.s: New test for instructions. ++ * gdb.arch/powerpc-power10.exp: Harness to run the test. ++ ++2021-4-12 Carl Love ++ ++ * gdb.arch/vsx-vsr-float128.c: New test file. ++ * gdb.arch/vsx-vsr-float128.exp: New expect file. ++ ++2021-04-12 Markus Metzger ++ ++ * gdb.btrace/reconnect.exp: Relax expected stepi output. ++ ++2021-04-07 Weimin Pan ++ ++ * gdb.base/ctf-ptype.c: Add struct link containing a forward ++ reference type. ++ * gdb.base/ctf-ptype.exp: Add "ptype struct link". ++ ++2021-04-07 Andrew Burgess ++ ++ * gdb.fortran/dynamic-ptype-whatis.exp: New file. ++ * gdb.fortran/dynamic-ptype-whatis.f90: New file. ++ ++2021-04-07 Andrew Burgess ++ ++ * gdb.cp/rvalue-ref-params.cc (f3): New function. ++ (f4): New function. ++ (global_int): New global variable. ++ (global_float): Likeiwse. ++ (main): Call both new functions. ++ * gdb.cp/rvalue-ref-params.exp: Add new tests. ++ ++2021-04-07 Andrew Burgess ++ ++ * gdb.dwarf2/fission-relative-dwo.c: New file. ++ * gdb.dwarf2/fission-relative-dwo.exp: New file. ++ ++2021-04-07 Andrew Burgess ++ ++ * gdb.dwarf2/fission-absolute-dwo.c: New file. ++ * gdb.dwarf2/fission-absolute-dwo.exp: New file. ++ * gdb.dwarf2/fission-base.exp: Use build_executable_and_dwo_files ++ instead of build_executable_from_fission_assembler. ++ * gdb.dwarf2/fission-loclists-pie.exp: Likewise. ++ * gdb.dwarf2/fission-loclists.exp: Likewise. ++ ++ * gdb.dwarf2/fission-multi-cu.S: Delete file. ++ * gdb.dwarf2/fission-multi-cu.c: New file based on old ++ fission-multi-cu1.c and fission-multi-cu2.c files. ++ * gdb.dwarf2/fission-multi-cu1.c: Delete file. ++ * gdb.dwarf2/fission-multi-cu2.c: Delete file. ++ * gdb.dwarf2/fission-multi-cu.exp: Rewrite to use Dwarf assembler. ++ * gdb.dwarf2/fission-reread.exp: Likewise. ++ * lib/dwarf.exp (extract_dwo_information): New proc. ++ (strip_dwo_information): New proc. ++ (build_executable_and_dwo_files): New proc. ++ (build_executable_from_fission_assembler): Delete. ++ (Dwarf::_debug_addr_index): New variable. ++ (Dwarf::_cu_is_fission): New variable. ++ (Dwarf::_handle_DW_FORM): Handle DW_OP_GNU_addr_index. ++ (Dwarf::_default_form): Supply a default for DW_AT_GNU_addr_base. ++ (Dwarf::_handle_macro_at_range): Use form DW_FORM_GNU_addr_index ++ if this is a fission CU. ++ (Dwarf::_location): Handle DW_OP_GNU_addr_index. ++ (Dwarf::debug_addr_label): New proc. ++ (Dwarf::cu): Initialise _cu_is_fission. ++ (Dwarf::tu): Likewise. ++ (Dwarf::assemble): Initialise _debug_addr_index. ++ ++2021-04-07 Andrew Burgess ++ ++ * gdb.dwarf2/dw2-using-debug-str.exp: Add an additional test. ++ ++2021-04-07 Andrew Burgess ++ ++ * gdb.python/py-parameter.exp: Add test for reading data-directory ++ using gdb.parameter API. ++ ++2021-04-06 Tom de Vries ++ ++ PR breakpoints/25884 ++ * gdb.opt/inline-cmds.exp: Remove kfail. ++ ++2021-04-06 Tom de Vries ++ ++ PR testsuite/27691 ++ * gdb.threads/gcore-thread.exp: Don't call gdb_core_cmd with core ++ file "". ++ ++2021-04-01 Egeyar Bagcioglu ++ ++ * lib/pdtrace.in: Fix obvious typo. ++ ++2021-03-31 Tom Tromey ++ ++ * lib/dwarf.exp (Dwarf::_get_args): New proc. ++ (Dwarf::_location): Use it. ++ ++2021-03-31 Tom de Vries ++ ++ PR testsuite/27667 ++ * lib/gdb.exp (default_gdb_init): Unset DEBUGINFOD_URLS. ++ ++2021-03-30 Simon Marchi ++ ++ PR gdb/27541 ++ * gdb.base/index-cache-load-twice.exp: Remove. ++ * gdb.base/index-cache-load-twice.c: Remove. ++ * gdb.dwarf2/per-bfd-sharing.exp: New. ++ * gdb.dwarf2/per-bfd-sharing.c: New. ++ ++2021-03-30 Tom de Vries ++ ++ PR testsuite/27604 ++ * gdb.dwarf2/dw2-cu-size.S: Add missing .debug_abbrev terminator. ++ ++2021-03-29 Tankut Baris Aktemur ++ ++ * gdb.mi/user-selected-context-sync.exp: Spin on a variable in ++ the infinite loop to avoid a Clang bug. ++ ++2021-03-26 Will Schmidt ++ ++ * gdb.arch/powerpc-disassembler-options.exp: Extend some test ++ names for uniqueness. ++ * gdb.arch/powerpc-fpscr-gcore.exp: Add more test names for ++ uniqueness. ++ ++2021-03-26 Andrew Burgess ++ ++ * gdb.python/py-prettyprint.c (struct container): Add 'is_array_p' ++ member. ++ (make_container): Initialise is_array_p. ++ * gdb.python/py-prettyprint.exp: Add new tests. ++ * gdb.python/py-prettyprint.py (ContainerPrinter.display_hint): ++ Check is_array_p and possibly return 'array'. ++ ++2021-03-26 Andrew Burgess ++ ++ * gdb.cp/breakpoint.exp: Extend test names to make them unique. ++ * gdb.cp/casts.exp: Give tests unique names. ++ * gdb.cp/filename.exp: Likewise. ++ * gdb.cp/gdb2495.exp: Likewise. ++ * gdb.cp/mb-ctor.exp: Extend test names to make them unique. ++ * gdb.cp/misc.exp: Rename test to make it unique. ++ * gdb.cp/nsnested.exp: Give tests unique names. ++ * gdb.cp/ovldbreak.exp: Likewise. ++ * gdb.cp/pr17494.exp: Rename test to reflect what is actually ++ being tested. This also removes the duplicate test name. ++ * gdb.cp/ref-types.exp: Likewise. ++ * gdb.cp/temargs.exp: Likewise. ++ ++2021-03-26 Andrew Burgess ++ ++ * gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape ++ square brackets in test. ++ ++2021-03-26 Andrew Burgess ++ ++ * gdb.cp/maint.exp (test_first_component): Run more tests with a ++ variable number of spaces, this removes the duplicate testing of ++ 'operator ->' which existed before. ++ ++2021-03-26 Andrew Burgess ++ ++ * gdb.cp/gdb2384.cc (main): Change comments used for breakpoints. ++ * gdb.cp/gdb2384.exp: Change and extend test names to avoid ++ duplicates, and also to avoid having a string inside parentheses ++ at the end of test names. ++ ++2021-03-26 Andrew Burgess ++ ++ * gdb.cp/nsusing.exp: Rewrite test, remove a duplicate test block. ++ Avoid repeated uses of 'runto', and instread just progress once ++ through the test stopping at different breakpoints. Give comments ++ a capital letter and full stop. Give duplicate tests unique names. ++ ++2021-03-25 Pedro Alves ++ ++ * gdb.server/stop-reply-no-thread-multi.exp (run_test): Add ++ "target_non_stop" parameter and use it. ++ (top level): Add "maint set target-non-stop on/off" testing axis. ++ ++2021-03-25 Andrew Burgess ++ ++ * lib/ada.exp (gnat_runtime_has_debug_info): Use -wrap with ++ gdb_test_multiple. ++ ++2021-03-24 Luis Machado ++ ++ * gdb.arch/aarch64-mte.c: New file. ++ * gdb.arch/aarch64-mte.exp: New test. ++ * gdb.base/memtag.c: New file. ++ * gdb.base/memtag.exp: New test. ++ * lib/gdb.exp (supports_memtag): New function. ++ ++2021-03-24 Luis Machado ++ ++ * gdb.base/options.exp: Adjust for new print options. ++ * gdb.base/with.exp: Likewise. ++ ++2021-03-22 Andrew Burgess ++ ++ * gdb.dwarf2/dw2-missing-cu-tag.c: New file. ++ * gdb.dwarf2/dw2-missing-cu-tag.exp: New file. ++ ++2021-03-22 Andrew Burgess ++ ++ * gdb.dwarf2/dw2-using-debug-str.c: New file. ++ * gdb.dwarf2/dw2-using-debug-str.exp: New file. ++ * lib/dwarf.exp (Dwarf::DW_FORM_strp): Create .debug_str section, ++ not .debug_string. ++ ++2021-03-20 Tom Tromey ++ ++ * gdb.base/maint.exp: Update "maint print statistics" output. ++ ++2021-03-19 Kevin Buettner ++ ++ * lib/gdbserver-support.exp (gdbserver_exit): Use the ++ "-nowait" flag when waiting for gdbserver to exit. ++ ++2021-03-19 Sourabh Singh Tomar ++ ++ * gdb.base/info-macros.exp: Append -fdebug-macro to ++ additional_flags for clang. ++ * gdb.base/macscp.exp: Likewise. ++ * gdb.base/style.exp: Likewise. ++ * gdb.linespec/macro-relative.exp: Likewise. ++ ++2021-03-17 Simon Marchi ++ Pedro Alves ++ ++ * gdb.base/run-attach-while-running.exp: New. ++ * gdb.base/run-attach-while-running.c: New. ++ ++2021-03-16 Andrew Burgess ++ ++ * gdb.python/py-framefilter-addr.c: New file. ++ * gdb.python/py-framefilter-addr.exp: New file. ++ * gdb.python/py-framefilter-addr.py: New file. ++ ++2021-03-16 Andrew Burgess ++ ++ * gdb.threads/execl.exp: Remove duplicate 'info threads' test. ++ Make use of $gdb_test_name instead of creating a separate $test ++ variable. ++ * gdb.threads/print-threads.exp: Add a with_test_prefix instead of ++ adding a '($name)' at the end of each test. This also catches the ++ one place where '($name)' was missing, and so caused a duplicate ++ test name. ++ * gdb.threads/queue-signal.exp: Give tests unique names to avoid ++ duplicate test names based on the command being tested. ++ * gdb.threads/signal-command-multiple-signals-pending.exp: ++ Likewise. ++ * lib/gdb.exp (gdb_compile_shlib_pthreads): Tweak test name to ++ avoid duplicate testnames when a test script uses this proc and ++ also gdb_compile_pthreads. ++ * lib/prelink-support.exp (build_executable_own_libs): Use ++ with_test_prefix to avoid duplicate test names when we call ++ build_executable twice. ++ ++2021-03-15 Tom Tromey ++ ++ * gdb.ada/fixed_points.exp: Add tests of unary + and -. ++ ++2021-03-15 Tom Tromey ++ ++ * gdb.ada/varsize_limit.exp: Add new test. ++ * gdb.ada/varsize_limit/vsizelim.adb: Update. ++ ++2021-03-15 Tom Tromey ++ ++ * gdb.ada/operator_call/twovecs.ads: New file. ++ * gdb.ada/operator_call/twovecs.adb: New file. ++ * gdb.ada/operator_call/opcall.adb: New file. ++ * gdb.ada/operator_call.exp: New file. ++ ++2021-03-15 Tom Tromey ++ ++ * gdb.ada/enums_overload/enums_overload_main.adb: New file. ++ * gdb.ada/enums_overload/enums_overload.ads: New file. ++ * gdb.ada/enums_overload/enums_overload.adb: New file. ++ * gdb.ada/enums_overload.exp: New file. ++ ++2021-03-15 Tom Tromey ++ ++ * gdb.ada/assign_arr/target_wrapper.ads (IArray, Put, Do_Nothing): ++ Declare. ++ * gdb.ada/assign_arr/target_wrapper.adb: New file. ++ * gdb.ada/assign_arr/main_p324_051.adb (IValue): New variable. ++ Call Put. ++ * gdb.ada/assign_arr.exp: Update. ++ ++2021-03-15 Andrew Burgess ++ ++ * gdb.python/py-auto-load-chaining-f1.c: New file. ++ * gdb.python/py-auto-load-chaining-f1.o-gdb.py: New file. ++ * gdb.python/py-auto-load-chaining-f2.c: New file. ++ * gdb.python/py-auto-load-chaining-f2.o-gdb.py: New file. ++ * gdb.python/py-auto-load-chaining.c: New file. ++ * gdb.python/py-auto-load-chaining.exp: New file. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-bad-printers.exp: Extend test names to make them ++ unique. ++ * gdb.python/py-events.exp: Likewise. ++ * gdb.python/py-finish-breakpoint2.exp: Likewise. ++ * gdb.python/py-frame-inline.exp: Likewise. ++ * gdb.python/py-frame.exp: Likewise. ++ * gdb.python/py-infthread.exp: Likewise. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-value-cc.exp: Remove a duplicate test. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/lib-types.exp: Update the test to check the correct ++ python variable. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-explore-cc.exp: Extend test names to make them ++ unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-lookup-type.exp: Remove duplicate test. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-symtab.exp: Extend test names to make them ++ unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-prompt.exp: Add with_test_prefix to make test ++ names unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-block.exp: Give tests unique names. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-pp-maint.exp: Extend test names to make them ++ unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-explore.exp: Add with_test_prefix to make test ++ names unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-finish-breakpoint.exp: Make test names unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-strfns.exp: Use with_test_prefix to make test ++ names unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-format-string.exp: Use proc_with_prefix to make ++ test names unique. ++ ++2021-03-12 Andrew Burgess ++ ++ * gdb.python/py-mi.exp: Use with_test_prefix to make test names ++ unique. ++ ++2021-03-09 Tom Tromey ++ ++ * gdb.base/cast-call.exp: New file. ++ * gdb.base/cast-call.c: New file. ++ ++2021-03-09 Andrew Burgess ++ ++ * gdb.gdb/python-helper.exp: New file. ++ ++2020-03-04 Felix Willgerodt ++ ++ * gdb.fortran/intrinsics.exp: Add LOC tests. ++ ++2021-03-09 Andrew Burgess ++ ++ * gdb.fortran/shape.exp: New file. ++ * gdb.fortran/shape.f90: New file. ++ ++2021-03-09 Andrew Burgess ++ ++ * gdb.fortran/size.exp: New file. ++ * gdb.fortran/size.f90: New file. ++ ++2021-03-09 Andrew Burgess ++ ++ * gdb.fortran/rank.exp: New file. ++ * gdb.fortran/rank.f90: New file. ++ ++2021-03-08 Tom Tromey ++ ++ * gdb.fortran/debug-expr.exp: Update tests. ++ ++2021-03-08 Tom Tromey ++ ++ * gdb.base/debug-expr.exp: Update expected dump output. ++ ++2021-03-06 Tom Tromey ++ ++ * lib/dwarf.exp (_handle_DW_FORM): Treat DW_FORM_GNU_ref_alt and ++ DW_FORM_GNU_strp_alt like DW_FORM_sec_offset. ++ * gdb.dwarf2/dwznolink.exp: New file. ++ ++2021-03-05 Mark Wielaard ++ ++ * lib/valgrind.exp (vgdb_start): Add --wait=1 to vgdbcmd. ++ ++2021-03-06 Weimin Pan ++ ++ * gdb.base/ctf-ptype.exp: Add function tests and fix typos. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/rn-dl-bind.exp: Add ldflags=-Wl,-z,lazy. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/non-stop.exp: Adjust expected source lines. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/stepi.exp: Add {} options to prepare_for_testing. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/exception.cc (main): Update test source. ++ * gdb.btrace/exception.exp: Update patterns. ++ * gdb.btrace/function_call_history.exp: Likewise. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/unknown_functions.exp: Move -Wl,-x to ldflags. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/rn-dl-bind.exp: Replace reverse-step with ++ reverse-continue to breakpoint. ++ ++2021-03-03 Markus Metzger ++ ++ * gdb.btrace/delta.exp: Remove instruction-history and ++ function-call-history checks. ++ ++2021-03-03 Markus Metzger ++ ++ * README (Note): Add nopie_ldflag. ++ * lib/gdb.exp (gdb_compile): Extend nopie handling. ++ ++2021-03-02 Tom Tromey ++ ++ * gdb.ada/fixed_points.exp: Remove most special cases for minimal ++ encodings. ++ ++2021-02-27 Lancelot Six ++ ++ PR gdb/27393 ++ * gdb.base/source-dir.exp: Test that empty dirnames are skipped. ++ ++ ++2021-02-26 Tom Tromey ++ ++ * lib/gdb.exp (skip_ctf_tests): Use expr on result. ++ ++2021-02-26 Jan Vrany ++ ++ * gdb.trace/mi-tsv-changed.exp (test_create_delete_modify_tsv): ++ Remove trailing \n from expected output. ++ ++2021-02-26 Markus Metzger ++ ++ * lib/gdb.exp (use_gdb_stub): Extend comment. ++ ++2021-02-25 Jan Matyas ++ ++ PR gdb/26819 ++ * gdb.server/stop-reply-no-thread.exp: Add two test ++ scenarios that cover remote targets which do not have ++ the concept of threads. ++ ++2021-02-25 Andrew Burgess ++ ++ * gdb.fortran/associated.exp: Add missing '-wrap' argument. ++ ++2021-02-25 Andrew Burgess ++ ++ PR fortran/26155 ++ * gdb.fortran/call-no-debug-func.f90: New file. ++ * gdb.fortran/call-no-debug-prog.f90: New file. ++ * gdb.fortran/call-no-debug.exp: New file. ++ ++2021-02-25 Andrew Burgess ++ ++ * gdb.fortran/associated.exp: New file. ++ * gdb.fortran/associated.f90: New file. ++ ++2021-02-25 Andrew Burgess ++ ++ * gdb.fortran/dot-ops.exp (dot_operations): Test ".xor.". ++ ++2021-02-24 Andrew Burgess ++ ++ * gdb.base/sect-cmd.exp: Update expected results. ++ ++2021-02-24 Andrew Burgess ++ ++ * gdb.base/sect-cmd.exp: Rewrite using modern testsuite ++ techniques. Enable the test for all targets. ++ ++2021-02-24 Andrew Burgess ++ ++ * gdb.base/maint-info-sections.exp: Add new tests. ++ (check_maint_info_target_sections_output): New proc. ++ ++2021-02-24 Andrew Burgess ++ ++ * gdb.arch/riscv-default-tdesc.exp: New file. ++ ++2021-02-24 Andrew Burgess ++ ++ * gdb.fortran/pointer-to-pointer.exp: Additional tests. ++ ++2021-02-18 Andrew Burgess ++ ++ * gdb.arch/i386-biarch-core.exp: Add target check. ++ ++2021-02-16 Alok Kumar Sharma ++ ++ * gdb.dwarf2/pr13961.S: Corrected invalid DIE references. ++ ++2021-02-12 Andrew Burgess ++ ++ * gdb.fortran/allocated.exp: New file. ++ * gdb.fortran/allocated.f90: New file. ++ ++2021-02-11 Andrew Burgess ++ ++ * gdb.fortran/lbound-ubound.exp: Remove old comment. ++ ++2021-02-11 Andrew Burgess ++ ++ * gdb.base/maint-info-sections.exp: Update expected output, and ++ add additional tests. Again. ++ ++2021-02-11 Andrew Burgess ++ ++ * gdb.base/maint-info-sections.exp: Update expected output, and ++ add additional tests. ++ ++2021-02-11 Andrew Burgess ++ ++ * gdb.base/maint-info-sections.exp: New file, content is moved ++ from gdb.base/maint.exp and cleaned up to use latest testsuite ++ techniques. ++ * gdb.base/maint.exp: Tests moved out to ++ gdb.base/maint-info-sections.exp. ++ ++2021-02-10 Simon Marchi ++ ++ * gdb.multi/multi-target.exp.tcl (setup): Add "set sysroot" to ++ GDBFLAGS. ++ ++2021-02-10 Andrew Burgess ++ ++ * gdb.fortran/lbound-ubound.F90: New file. ++ * gdb.fortran/lbound-ubound.exp: New file. ++ ++2021-02-10 Tom de Vries ++ ++ * lib/gdb.exp (gdb_load_no_complaints): Remove unnecessary ++ "Restore saved setting of complaints". ++ ++2021-02-09 Tom de Vries ++ ++ PR symtab/27341 ++ * lib/gdb.exp (with_complaints): New proc, factored out of ... ++ (gdb_load_no_complaints): ... here. ++ * gdb.fortran/function-calls.exp: Add test-case. ++ ++2021-02-09 Abid Qadeer ++ ++ * gdb.threads/signal-command-handle-nopass.exp: Call ++ 'standard_testfile' before using 'testfile'. ++ * gdb.threads/signal-command-multiple-signals-pending.exp: Likewise. ++ * gdb.threads/signal-delivered-right-thread.exp: Likewise ++ * gdb.threads/signal-sigtrap.exp: Likewise ++ ++2021-02-08 Luis Machado ++ ++ * gdb.base/gnu-ifunc.exp (build): Pass -Wl,z,lazy. ++ ++2021-02-08 Tom de Vries ++ ++ * gdb.dwarf2/enqueued-cu-base-addr.exp: Fix inter-CU reference. ++ ++2021-02-08 Andrew Burgess ++ ++ * gdb.python/tui-window-disabled.c: New file. ++ * gdb.python/tui-window-disabled.exp: New file. ++ * gdb.python/tui-window-disabled.py: New file. ++ ++2021-02-08 Andrew Burgess ++ ++ * gdb.python/tui-window.exp: Add new tests. ++ * gdb.python/tui-window.py (TestWindow) <__init__>: Store ++ TestWindow object into global the_window. ++ : New method. ++ (delete_window_title): New function. ++ ++2021-02-08 Andrew Burgess ++ ++ * gdb.tui/winheight.exp: Add more tests. ++ ++2021-02-08 Andrew Burgess ++ ++ * gdb.python/py-framefilter.exp: Update expected results. ++ * gdb.python/python.exp: Update expected results. ++ ++2021-02-08 Andrew Burgess ++ ++ * gdb.tui/scroll.exp: Tighten expected results. Remove comment ++ about bug in GDB, update expected results, and add more tests. ++ ++2021-02-08 Andrew Burgess ++ ++ * gdb.tui/scroll.exp: New file. ++ * gdb.tui/tui-layout-asm-short-prog.exp: Update expected results. ++ * lib/tuiterm.exp (Term::_csi_M): Delete count lines, scroll ++ remaining lines up. ++ (Term::check_region_contents): New proc. ++ (Term::check_box_contents): Use check_region_contents. ++ ++2021-02-06 Tom de Vries ++ ++ PR testsuite/26922 ++ * gdb.tui/tui-layout-asm.exp: Ignore whitespace mismatches when ++ scrolling. ++ ++2021-02-05 Tom de Vries ++ ++ PR breakpoints/27313 ++ * gdb.base/catch-syscall.exp: Check that "catch syscall -1" is ++ rejected. ++ ++2021-02-05 Tom de Vries ++ ++ * gdb.dwarf2/main-subprogram.exp: Add KFAIL for PR symtab/24549. ++ * gdb.fortran/mixed-lang-stack.exp: Same. ++ ++2021-02-05 Tom de Vries ++ ++ PR exp/27265 ++ * gdb.base/complex-parts.exp: Add tests. ++ ++2021-02-05 Tom de Vries ++ ++ PR symtab/27307 ++ * gdb.dwarf2/clang-debug-names.exp: Check file command warnings. ++ ++2021-02-04 Shahab Vahedi ++ ++ * gdb.xml/tdesc-regs.exp: Use correct core-regs for ARC. ++ ++2021-02-03 Pedro Alves ++ ++ * gdb.threads/detach-step-over.c: New file. ++ * gdb.threads/detach-step-over.exp: New file. ++ ++2021-02-03 Pedro Alves ++ ++ * gdb.threads/attach-non-stop.c: New file. ++ * gdb.threads/attach-non-stop.exp: New file. ++ ++2021-02-02 Lancelot SIX ++ ++ * gdb.base/inferior-noarg.c: New test. ++ * gdb.base/inferior-noarg.exp: New test. ++ ++2021-02-02 Simon Marchi ++ ++ * gdb.base/scope.exp: Use proc_with_prefix. ++ ++2021-02-02 Simon Marchi ++ ++ * lib/dwarf.exp (rnglists): Add -no-offset-array option to ++ table proc. ++ * gdb.dwarf2/rnglists-sec-offset.exp: Add test for ++ .debug_rnglists table without offset array. ++ * gdb.dwarf2/loclists-sec-offset.exp: Add test for ++ .debug_loclists table without offset array. ++ ++2021-02-02 Simon Marchi ++ ++ * gdb.dwarf2/rnglists-sec-offset.exp: Add test for DW_AT_ranges ++ of DW_FORM_sec_offset form plus DW_AT_rnglists_base attribute. ++ * gdb.dwarf2/loclists-sec-offset.exp: Add test for ++ DW_AT_location of DW_FORM_sec_offset plus DW_AT_loclists_base ++ attribute ++ ++2021-02-02 Simon Marchi ++ ++ PR gdb/26813 ++ * lib/dwarf.exp (_handle_DW_FORM): Handle DW_FORM_loclistx. ++ (loclists): New proc. ++ * gdb.dwarf2/loclists-multiple-cus.c: New. ++ * gdb.dwarf2/loclists-multiple-cus.exp: New. ++ * gdb.dwarf2/loclists-sec-offset.c: New. ++ * gdb.dwarf2/loclists-sec-offset.exp: New. ++ ++2021-02-02 Simon Marchi ++ ++ * lib/dwarf.exp (_location): Add parameters. ++ (_handle_DW_FORM): Adjust. ++ ++2021-02-02 Simon Marchi ++ ++ PR gdb/26813 ++ * lib/dwarf.exp (_handle_DW_FORM): Handle DW_FORM_rnglistx. ++ (cu): Generate header for DWARF 5. ++ (rnglists): New proc. ++ * gdb.dwarf2/rnglists-multiple-cus.exp: New. ++ * gdb.dwarf2/rnglists-sec-offset.exp: New. ++ ++2021-02-02 Tom de Vries ++ ++ PR symtab/24620 ++ * gdb.dwarf2/fission-reread.exp: Add test-case. ++ ++2021-02-01 Tom de Vries ++ ++ * gdb.dwarf2/fission-base.S: Pass -DDWO=$dwo. ++ * gdb.dwarf2/fission-loclists-pie.S: Same. ++ * gdb.dwarf2/fission-loclists.S: Same. ++ * gdb.dwarf2/fission-multi-cu.S: Same. ++ * gdb.dwarf2/fission-reread.S: Same. ++ * gdb.dwarf2/fission-base.exp: Use DWO. ++ * gdb.dwarf2/fission-loclists-pie.exp: Same. ++ * gdb.dwarf2/fission-loclists.exp: Same. ++ * gdb.dwarf2/fission-multi-cu.exp: Same. ++ * gdb.dwarf2/fission-reread.exp: Same. ++ ++2021-01-29 Tom de Vries ++ ++ PR breakpoints/26063 ++ * gdb.dwarf2/dw2-step-out-of-function-no-stmt.c: New test. ++ * gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp: New file. ++ ++2021-01-29 Tom de Vries ++ ++ * gdb.opt/solib-intra-step.exp: Remove state tracking logic. ++ ++2021-01-28 Tom de Vries ++ ++ * gdb.arch/i386-gnu-cfi.exp: Capture the position of function gate ++ in the backtrace, and use that in the rest of the test instead of ++ hardcoded constant 3. Use "frame" instead of "up" for robustness. ++ ++2021-01-28 Tom de Vries ++ ++ * gdb.arch/i386-sse-stack-align.S: Rename g[0-4] to test_g[0-4]. ++ * gdb.arch/i386-sse-stack-align.c: Same. ++ * gdb.arch/i386-sse-stack-align.exp: Same. ++ ++2021-01-28 Andrew Burgess ++ ++ * lib/gdb.exp (default_gdb_init): Unset XDG_CONFIG_HOME. ++ ++2021-01-28 Tom de Vries ++ ++ * gdb.ada/out_of_line_in_inlined.exp: Use gdb_breakpoint. ++ ++2021-01-28 Tom de Vries ++ ++ * gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: Add regexp to ++ "maint info line-table". Make PASS pattern more specific. Make ++ FAIL pattern work for -m32. ++ ++2021-01-27 Lancelot SIX ++ ++ PR gdb/27133 ++ * gdb.base/ui-redirect.exp: Add test case that ensures that ++ redirecting both logging and debug does not cause gdb to crash. ++ ++ ++2021-01-27 Matthew Malcomson ++ ++ * gdb.arch/insn-reloc.c: Add tests for BR and BLR. ++ ++2021-01-26 Tom de Vries ++ ++ * gdb.threads/killed-outside.exp: Allow regular output. ++ ++2021-01-26 Tom de Vries ++ ++ * gdb.opt/solib-intra-step.exp: Handle stepping into thunk. ++ ++2021-01-25 Tom de Vries ++ ++ * gdb.dwarf2/dw2-ranges-psym.exp (gdb_load_no_complaints): New proc. ++ * lib/gdb.exp: Use gdb_load_no_complaints. ++ ++2021-01-25 Tom Tromey ++ ++ * gdb.ada/fixed_points.exp: Add regression test. ++ * gdb.ada/fixed_points/fixed_points.adb (FP5_Var): New variable. ++ * gdb.ada/fixed_points/pck.adb (Delta5, FP5_Type): New. ++ ++2021-01-25 Tom Tromey ++ ++ * gdb.ada/local-enum.exp: Add enumerator resolution test. ++ ++2021-01-25 Tom Tromey ++ ++ * gdb.ada/local-enum.exp: New file. ++ * gdb.ada/local-enum/local.adb: New file. ++ ++2021-01-23 Tom Tromey ++ ++ * lib/gdb.exp (default_gdb_init): Set INPUTRC to a cached file. ++ ++2021-01-22 Bernd Edlinger ++ ++ * gdb.base/line65535.exp: Fix test expectation. ++ ++2021-01-22 Simon Marchi ++ ++ * lib/gdb.exp (gdb_test_multiple): Remove things related to test ++ suppression. ++ (default_gdb_exit): Likewise. ++ (default_gdb_spawn): Likewise. ++ (send_gdb): Likewise. ++ (gdb_expect): Likewise. ++ (gdb_expect_list): Likewise. ++ (default_gdb_init): Likewise. ++ (gdb_suppress_entire_file): Remove. ++ (gdb_suppress_tests): Remove. ++ (gdb_stop_suppressing_tests): Remove. ++ (gdb_clear_suppressed): Remove. ++ * lib/mi-support.exp (mi_uncatched_gdb_exit): Remove things ++ related to test suppression. ++ (default_mi_gdb_start): Likewise. ++ (mi_gdb_reinitialize_dir): Likewise. ++ (mi_gdb_test): Likewise. ++ (mi_run_cmd_full): Likewise. ++ (mi_runto_helper): Likewise. ++ (mi_execute_to): Likewise. ++ * lib/prompt.exp (default_prompt_gdb_start): Likewise. ++ * gdb.base/bitfields.exp: Likewise. ++ * gdb.base/bitfields2.exp: Likewise. ++ * gdb.base/break.exp: Likewise. ++ * gdb.base/call-sc.exp: Likewise. ++ * gdb.base/callfuncs.exp: Likewise. ++ * gdb.base/dfp-test.exp: Likewise. ++ * gdb.base/endian.exp: Likewise. ++ * gdb.base/exprs.exp: Likewise. ++ * gdb.base/funcargs.exp: Likewise. ++ * gdb.base/hbreak2.exp: Likewise. ++ * gdb.base/recurse.exp: Likewise. ++ * gdb.base/scope.exp: Likewise. ++ * gdb.base/sepdebug.exp: Likewise. ++ * gdb.base/structs.exp: Likewise. ++ * gdb.base/until.exp: Likewise. ++ * gdb.cp/misc.exp: Likewise. ++ ++2021-01-22 Andrew Burgess ++ ++ PR cli/25956 ++ * gdb.base/style.exp (run_style_tests): Add version string test. ++ (test_startup_version_string): Use version style name. ++ * lib/gdb-utils.exp (style): Handle version style name. ++ ++2021-01-22 Andrew Burgess ++ ++ * gdb.base/style.exp (limited_style): New proc. ++ (clean_restart_and_disable): New proc. ++ (run_style_tests): New proc. Most of the old tests from this file ++ are now in this proc. ++ (test_startup_version_string): New proc. Reamining test from the ++ old file is in this proc. ++ ++2021-01-22 Simon Marchi ++ ++ * lib/range-stepping-support.exp (exec_cmd_expect_vCont_count): ++ Adjust to "set debug remote" changes. ++ ++2021-01-21 Luis Machado ++ ++ * lib/gdbserver-support.exp (gdb_target_cmd_ext): Handle a new error ++ message. ++ ++2021-01-21 Simon Marchi ++ ++ * lib/tuiterm.exp (_log, _log_cur): New, use throughout. ++ ++2021-01-21 Hannes Domani ++ ++ PR python/19151 ++ * gdb.python/py-breakpoint.exp: Add tests for hardware breakpoints. ++ ++2021-01-20 Simon Marchi ++ ++ * lib/tuiterm.exp: Rename _cur_x/_cur_y to _cur_col/_cur_row. ++ ++2021-01-20 Simon Marchi ++ ++ * lib/tuiterm.exp: Add links in comments. ++ ++2021-01-20 Tom de Vries ++ ++ * gdb.python/py-format-string.exp: Allow Deriv+$decimal as vtable ++ offset. ++ ++2021-01-20 Tom de Vries ++ ++ * lib/gdb.exp (skip_rust_tests): Skip if multilib_flags contains -m32. ++ ++2021-01-20 Sergio Durigan Junior ++ ++ * gdb.arch/amd64-stap-expressions.S: New file. ++ * gdb.arch/amd64-stap-expressions.exp: New file. ++ ++2021-01-19 Tom de Vries ++ ++ * gdb.base/step-over-syscall.exp: Detect and handle sysenter/int ++ sequence. ++ ++2021-01-19 Tom de Vries ++ ++ * gdb.arch/i386-mpx.c (main): Drop argc/argv parameter. ++ ++2021-01-18 Andrew Burgess ++ ++ * gdb.fortran/array-slices.exp (run_test): Avoid including ++ addresses in test names. ++ ++2021-01-15 Tom de Vries ++ ++ PR testsuite/26997 ++ * gdb.fortran/array-slices.exp (run_test): Avoid pointer arithmetic ++ when adding sizeof. ++ ++2021-01-14 Tom de Vries ++ ++ PR testsuite/24590 ++ * gdb.base/style.exp: Handle shorter argv in frame command output. ++ ++2021-01-13 Andrew Burgess ++ ++ PR gdb/26819 ++ * gdb.server/stop-reply-no-thread-multi.c: New file. ++ * gdb.server/stop-reply-no-thread-multi.exp: New file. ++ ++2021-01-12 Tom de Vries ++ ++ * gdb.arch/i386-mpx-call.c (have_mpx): Remove. ++ (main): Remove call to have_mpx. ++ * gdb.arch/i386-mpx-call.exp: Use have_mpx. ++ * gdb.arch/i386-mpx-map.c (have_mpx): Remove. ++ (main): Remote call to have_mpx. ++ * gdb.arch/i386-mpx-map.exp: Use have_mpx. ++ * gdb.arch/i386-mpx-sigsegv.c (have_mpx): Remove. ++ (main): Remove call to have_mpx. ++ * gdb.arch/i386-mpx-sigsegv.exp: Use have_mpx. ++ * gdb.arch/i386-mpx-simple_segv.c (have_mpx): Remove. ++ (main): Remove call to have_mpx. ++ * gdb.arch/i386-mpx-simple_segv.exp: Use have_mpx. ++ * gdb.arch/i386-mpx.c (have_mpx): Remove. ++ (main): Remote call to have_mpx. ++ * gdb.arch/i386-mpx.exp: Use have_mpx. ++ * lib/gdb.exp (have_mpx): New proc. ++ ++2021-01-12 Srinath Parvathaneni ++ ++ * gdb.arch/aarch64-fp.exp: Modify to test bfloat16 support. ++ ++2021-01-12 Tom de Vries ++ ++ * gdb.base/disasm-optim.exp: Require is_amd64_regs_target. ++ ++2021-01-12 Andrew Burgess ++ ++ * gdb.fortran/debug-expr.exp: Add new tests. ++ ++2021-01-12 Andrew Burgess ++ ++ * gdb.fortran/dot-ops.exp: Add new tests. ++ ++2021-01-11 Tom de Vries ++ ++ PR testsuite/26968 ++ * gdb.arch/amd64-stap-three-arg-disp.S: Remove insn modifying $ebx. ++ Move insn setting $eax to before probe point. ++ ++2021-01-09 Tom Tromey ++ ++ * gdb.trace/ax.exp: Do not require an "ext". ++ ++2021-01-08 Tom Tromey ++ ++ * gdb.ada/voidctx/pck.adb: New file. ++ * gdb.ada/voidctx/pck.ads: New file. ++ * gdb.ada/voidctx/voidctx.adb: New file. ++ * gdb.ada/voidctx.exp: New file. ++ ++2021-01-08 Simon Marchi ++ ++ PR gdb/27157 ++ * gdb.base/empty-host-env-vars.exp: New test. ++ ++2021-01-08 Andrew Burgess ++ ++ * gdb.base/completion.exp: Add a new test. ++ ++2021-01-08 Andrew Burgess ++ ++ * gdb.fortran/intvar-dynamic-types.exp: New file. ++ * gdb.fortran/intvar-dynamic-types.f90: New file. ++ ++2021-01-08 Andrew Burgess ++ ++ * gdb.fortran/intvar-array.exp: New file. ++ * gdb.fortran/intvar-array.f90: New file. ++ ++2021-01-07 Tom Tromey ++ ++ * gdb.ada/assign_arr.exp: Add 'others' test. ++ ++2021-01-06 Tom Tromey ++ ++ * gdb.ada/fixed_points/pck.ads (Delta4): New constant. ++ (FP4_Type): New type. ++ (FP4_Var): New variable. ++ * gdb.ada/fixed_points/fixed_points.adb: Update. ++ * gdb.ada/fixed_points.exp: Add tests for binary operators. ++ ++2021-01-06 Simon Marchi ++ ++ * lib/gdb.exp (gdb_test_sequence): Accept -prompt switch. ++ * gdb.threads/signal-while-stepping-over-bp-other-thread.exp: ++ Pass prompt containing debug print to gdb_test_sequence. ++ ++2021-01-04 Tom de Vries ++ ++ * gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: New file. ++ ++2021-01-04 Simon Marchi ++ ++ ++ ++2021-01-04 Simon Marchi ++ ++ * gdb.server/abspath.exp: Append "set sysroot" to GDBFLAGS. ++ * gdb.server/connect-without-multi-process.exp: Likewise. ++ * gdb.server/exit-multiple-threads.exp: Likewise. ++ * gdb.server/ext-attach.exp: Likewise. ++ * gdb.server/ext-restart.exp: Likewise. ++ * gdb.server/ext-run.exp: Likewise. ++ * gdb.server/ext-wrapper.exp: Likewise. ++ * gdb.server/multi-ui-errors.exp: Likewise. ++ * gdb.server/no-thread-db.exp: Likewise. ++ * gdb.server/reconnect-ctrl-c.exp: Likewise. ++ * gdb.server/run-without-local-binary.exp: Likewise. ++ * gdb.server/server-kill.exp: Likewise. ++ * gdb.server/server-run.exp: Likewise. ++ * gdb.server/solib-list.exp: Likewise. ++ * gdb.server/stop-reply-no-thread.exp: Likewise. ++ * gdb.server/wrapper.exp: Likewise. ++ * gdb.server/sysroot.exp: Increase timeout when testing the ++ target: sysroot. ++ ++2021-01-04 Simon Marchi ++ ++ * gdb.server/server-run.exp: Use clean_restart. ++ ++2021-01-04 Simon Marchi ++ ++ * gdb.server/ext-run.exp: Use clean_restart. ++ ++2021-01-04 Simon Marchi ++ ++ * gdb.server/stop-reply-no-thread.exp: Use build_executable ++ instead of prepare_for_testing. ++ ++2021-01-04 Simon Marchi ++ ++ * gdb.server/solib-list.exp: Use clean_restart. ++ ++2021-01-04 Tom de Vries ++ ++ * gdb.base/morestack.c: Remove printf. ++ * gdb.base/morestack.exp: Don't use -fuse-ld=gold. ++ ++2020-12-31 Tom Tromey ++ ++ * gdb.rust/simple.exp: Update output for Rust 1.49. ++ ++2020-12-31 Bernd Edlinger ++ ++ * gdb.cp/step-and-next-inline.exp: Fix test case. ++ ++2020-12-30 Simon Marchi ++ ++ * gdb.python/py-frame-args.exp: De-duplicate test names. ++ ++2020-12-24 Andrew Burgess ++ ++ PR gdb/27059 ++ * gdb.dwarf2/dyn-type-unallocated.c: New file. ++ * gdb.dwarf2/dyn-type-unallocated.exp: New file. ++ ++2020-12-21 Peter Waller ++ ++ * gdb.base/style-interp-exec-mi.exp: New. ++ * gdb.base/style-interp-exec-mi.c: New. ++ ++2020-12-21 Simon Marchi ++ ++ * gdb.base/list.exp: Replace send_gdb + gdb_expect with ++ gdb_test. Use proc_with_prefix. ++ ++2020-12-21 Markus Metzger ++ ++ * gdb.btrace/exception.exp: Build with nopie. ++ * gdb.btrace/function_call_history.exp: Likewise. ++ * gdb.btrace/unknown_functions.exp: Likewise. ++ ++2020-12-21 Markus Metzger ++ ++ * gdb.btrace/multi-inferior.exp: Skip if use_gdb_stub. ++ ++2020-12-21 Markus Metzger ++ ++ * gdb.python/py-record-btrace.exp: Make test names unique. ++ * gdb.python/py-record-full.exp: Likewise. ++ ++2020-12-21 Markus Metzger ++ ++ * gdb.btrace/data.exp: Make test names unique. ++ * gdb.btrace/delta.exp: Likewise. ++ * gdb.btrace/enable.exp: Likewise. ++ * gdb.btrace/function_call_history.exp: Likewise. ++ * gdb.btrace/nohist.exp: Likewise. ++ * gdb.btrace/non-stop.exp: Likewise. ++ * gdb.btrace/rn-dl-bind.exp: Likewise. ++ * gdb.btrace/step.exp: Likewise. ++ * gdb.btrace/stepi.exp: Likewise. ++ * gdb.btrace/tailcall.exp: Likewise. ++ ++2020-12-21 Markus Metzger ++ ++ * gdb.btrace/enable.exp: Update error message. ++ * gdb.btrace/multi-inferior.exp: Likewise. ++ * gdb.btrace/reconnect.exp: Likewise. ++ * gdb.python/py-record-btrace.exp: Likewise. ++ * gdb.python/py-record-full.exp: Likewise. ++ ++2020-12-20 Tom de Vries ++ ++ * lib/gdb.exp (save_target_board_info): New proc. ++ (gdb_compile_shlib): Use save_target_board_info. ++ ++2020-12-19 Tom de Vries ++ ++ * lib/gdb.exp (supports_scalar_storage_order_attribute) ++ (supports_gnuc): New proc. ++ * gdb.base/endianity.exp: Define TEST_SSO. Eliminate ++ test_compiler_info calls. Add unsupported message. ++ * gdb.base/endianity.c: Use TEST_SSO. ++ ++2020-12-19 Hannes Domani ++ ++ PR exp/27070 ++ * gdb.python/compare-enum-type-a.c: New test. ++ * gdb.python/compare-enum-type-b.c: New test. ++ * gdb.python/compare-enum-type.exp: New file. ++ * gdb.python/compare-enum-type.h: New test. ++ ++2020-12-18 Hannes Domani ++ ++ * gdb.python/py-format-string.exp: Add tests for address keyword. ++ ++2020-12-18 Hannes Domani ++ ++ * gdb.python/py-type.exp: Add tests for TYPE_CODE_METHOD. ++ ++2020-12-18 Tom Tromey ++ ++ * gdb.ada/fixed_points.exp: Also run with ++ -fgnat-encodings=minimal. Update expected output. ++ ++2020-12-16 Simon Marchi ++ ++ * gdb.base/async-shell.exp: Enable non-stop through GDBFLAGS. ++ * gdb.base/continue-all-already-running.exp: Likewise. ++ * gdb.base/moribund-step.exp: Likewise. ++ * gdb.base/step-sw-breakpoint-adjust-pc.exp: Likewise. ++ ++2020-12-16 Tom de Vries ++ ++ * gdb.base/batch-preserve-term-settings.exp: ++ ++2020-12-16 Tom de Vries ++ ++ * lib/gdb.exp (gdb_compile_shlib_1): Factor out of ... ++ (gdb_compile_shlib): ... here. Filter out PIE-related flags. ++ ++2020-12-16 Luis Machado ++ ++ * gdb.arch/aarch64-tagged-pointer.c (main): Add a few more ++ pointer-based memory accesses. ++ * gdb.arch/aarch64-tagged-pointer.exp: Exercise additional ++ hw watchpoint cases. ++ ++2020-12-15 Rae Kim ++ ++ * gdb.base/document.exp: New test. ++ ++2020-12-15 Tom Tromey ++ ++ * gdb.base/style.exp: Add deprecation tests. ++ ++2020-12-14 Simon Marchi ++ ++ * lib/gdb.exp (gdb_test_multiple): Fix typo in doc. ++ ++2020-12-14 Mark Wielaard ++ ++ * lib/dwarf.exp (Dwarf::_handle_attribute): Handle SPECIAL_expr ++ specially, set attr_form_comment to the actual FORM string used. ++ ++2020-12-14 Mark Wielaard ++ ++ * lib/dwarf.exp (Dwarf::_read_constants): Don't set ++ _constants(SPECIAL_expr) here, but set it... ++ (Dwarf::cu): ...here based on _cu_version. ++ ++2020-12-14 Tom de Vries ++ ++ * lib/gdb.exp (gdb_compile_shlib): Make sure it's not necessary to ++ pass -fPIC. ++ * gdb.ada/catch_ex_std.exp: Don't pass -fPIC to gdb_compile_shlib. ++ * gdb.base/break-probes.exp: Same. ++ * gdb.base/ctxobj.exp: Same. ++ * gdb.base/dso2dso.exp: Same. ++ * gdb.base/global-var-nested-by-dso.exp: Same. ++ * gdb.base/info-shared.exp: Same. ++ * gdb.base/jit-reader-simple.exp: Same. ++ * gdb.base/print-file-var.exp: Same. ++ * gdb.base/skip-solib.exp: Same. ++ * gdb.btrace/dlopen.exp: Same. ++ ++2020-12-14 Tom de Vries ++ ++ PR testsuite/26963 ++ * lib/gdb.exp (run_on_host): Declare test unsupported if spawn fails. ++ ++2020-12-14 Tom de Vries ++ ++ PR testsuite/26962 ++ * gdb.base/solib-corrupted.exp: Handle "'_r_debug' has unknown type; ++ cast it to its declared type". ++ ++2020-12-14 Tom de Vries ++ ++ PR testsuite/26951 ++ * gdb.base/batch-preserve-term-settings.exp: Use "gdb-subshell$ " as ++ shell prompt. ++ ++2020-12-14 Tom Tromey ++ ++ * gdb.ada/nested.exp: Add new tests. ++ * gdb.ada/nested/hello.adb (Fourth, Fifth): New procedures. ++ ++2020-12-14 Tom Tromey ++ ++ * gdb.dwarf2/ada-thick-pointer.exp: New file. ++ ++2020-12-14 Tom Tromey ++ ++ * gdb.dwarf2/dw2-fixed-point.exp: Add test for division by zero. ++ ++2020-12-13 Tom de Vries ++ ++ PR testsuite/26953 ++ * gdb.base/endianity.exp: Skip tests requiring scalar_storage_order ++ attribute support if compiler doesn't support it. ++ ++2020-12-13 Tom de Vries ++ ++ * lib/gdb.exp (gdb_compile_shlib): Handle ada. ++ * gdb.ada/catch_ex_std.exp: Use gdb_compile_shlib to compile from ++ source to shared lib. Add ada to options. ++ ++2020-12-13 Tom de Vries ++ ++ * gdb.ada/catch_ex_std.exp: Use gnatmake -bargs and -largs instead of ++ calling gnatbind and gnatlink. ++ ++2020-12-13 Andrew Burgess ++ ++ * gdb.base/dcache-flush.c: New file. ++ * gdb.base/dcache-flush.exp: New file. ++ ++2020-12-13 Andrew Burgess ++ ++ * gdb.base/c-linkage-name.exp: Update to use new 'maint flush ...' ++ commands. ++ * gdb.base/killed-outside.exp: Likewise. ++ * gdb.opt/inline-bt.exp: Likewise. ++ * gdb.perf/gmonster-null-lookup.py: Likewise. ++ * gdb.perf/gmonster-print-cerr.py: Likewise. ++ * gdb.perf/gmonster-ptype-string.py: Likewise. ++ * gdb.python/py-unwind.exp: Likewise. ++ ++2020-12-11 Andrew Burgess ++ ++ * gdb.base/commands.exp: Update expected results. ++ ++2020-12-11 Andrew Burgess ++ ++ PR cli/15104 ++ * gdb.base/commands.exp: Add additional tests. ++ * gdb.base/completion.exp: Add additional tests. ++ ++2020-12-11 Andrew Burgess ++ ++ * gdb.base/completion.exp: Add additional tests. ++ ++2020-12-11 Tom de Vries ++ ++ PR testsuite/26991 ++ * gdb.arch/i386-mpx-call.exp: Don't expect to trigger bounds ++ violations by setting bounds registers if the bounds are passed in the ++ Bounds Table. ++ ++2020-12-11 Tom de Vries ++ ++ PR testsuite/26954 ++ * gdb.base/float128.exp: Detect and handle no mpfr support. ++ ++2020-12-10 Simon Marchi ++ ++ PR gdb/24694 ++ * gdb.multi/multi-arch-exec.c (thread_start, main): Add barrier ++ calls. ++ ++2020-12-10 Tom de Vries ++ ++ PR testsuite/26947 ++ * gdb.tui/new-layout.exp: Don't execute tests with unbalanced curly ++ braces for tcl 8.5 and earlier. ++ ++2020-12-09 Simon Marchi ++ ++ PR 26875, PR 26901 ++ * gdb.base/flexible-array-member.c: New test. ++ * gdb.base/flexible-array-member.exp: New test. ++ ++2020-12-08 Tom de Vries ++ ++ * gdb.arch/amd64-gs_base.exp: Undo commit 67748e0f66, reimplement ++ using is_amd64_regs_target. ++ ++2020-12-08 Tom de Vries ++ ++ * gdb.ada/mi_task_arg.exp: Accept as valid value of ++ self_id. ++ ++2020-12-07 Pedro Alves ++ ++ * gdb.base/break-on-linker-gcd-function.exp: Remove unused ++ 'additional_flags' variable. ++ ++2020-12-07 Tankut Baris Aktemur ++ ++ * gdb.linespec/explicit.exp: Extend with a test to check completing ++ '-' after seemingly complete options. ++ ++2020-12-07 Tankut Baris Aktemur ++ ++ * gdb.linespec/keywords.exp: Add tests to check positional ++ flexibility of "-force-condition". ++ ++2020-12-07 Tankut Baris Aktemur ++ ++ * gdb.base/bp-cmds-run-with-ex.c: New file. ++ * gdb.base/bp-cmds-run-with-ex.exp: New file. ++ * gdb.base/bp-cmds-run-with-ex.gdb: New file. ++ * gdb.gdb/python-interrupts.exp: Update the call to ++ 'catch_command_errors' with the new argument. ++ * gdb.gdb/python-selftest.exp: Ditto. ++ ++2020-12-04 Simon Marchi ++ ++ * gdb.arch/amd64-disp-step-avx.exp: Adjust pattern. ++ * gdb.threads/forking-threads-plus-breakpoint.exp: Likewise. ++ * gdb.threads/non-stop-fair-events.exp: Likewise. ++ ++2020-12-04 Simon Marchi ++ ++ * gdb.threads/step-over-exec.exp: New. ++ * gdb.threads/step-over-exec.c: New. ++ * gdb.threads/step-over-exec-execd.c: New. ++ * lib/my-syscalls.S: New. ++ * lib/my-syscalls.h: New. ++ ++2020-12-04 Simon Marchi ++ ++ * lib/dwarf.exp (declare_labels): Use name as text if text is ++ not provided. ++ ++2020-12-04 Tom de Vries ++ ++ PR testsuite/26990 ++ * gdb.arch/amd64-gs_base.exp: Handle -m32 where fs_base and gs_base ++ are unsupported. ++ ++2020-12-04 Tom de Vries ++ ++ * gdb.reverse/insn-reverse.exp: Don't break inside gdb_test_multiple ++ clause. ++ ++2020-12-04 Tom de Vries ++ ++ * gdb.reverse/insn-reverse.exp: Fix count handling. ++ ++2020-12-04 Tom de Vries ++ ++ * gdb.reverse/insn-reverse-x86.c: Guard x86_64 assembly with #ifdef ++ __x86_64__. ++ ++2020-12-04 Tom de Vries ++ ++ * gdb.reverse/insn-reverse.c (test_nr): New var. ++ (usage, parse_args): New function. ++ (main): Call parse_args. Only run test for test_nr. ++ * gdb.reverse/insn-reverse.exp: Detect lack of progress in stepi loop ++ and bail out. Run subtests individually, using an inferior arg ++ specifying the subtest. ++ ++2020-12-02 Andrew Burgess ++ ++ * gdb.arch/riscv-tdesc-regs.exp: Remove unwanted test. ++ ++2020-12-02 Andrew Burgess ++ ++ * gdb.arch/riscv-tdesc-regs.exp (get_expected_result): New proc, ++ update test to use this. ++ ++2020-12-01 Simon Marchi ++ ++ * gdb.threads/non-ldr-exc-1.exp: Fix indentation. ++ ++2020-12-01 Simon Marchi ++ ++ * gdb.threads/non-ldr-exc-1.exp: Use foreach_with_prefix. ++ (do_test): Don't use with_test_prefix. ++ * gdb.threads/non-ldr-exc-2.exp: Use foreach_with_prefix. ++ (do_test): Don't use with_test_prefix. ++ * gdb.threads/non-ldr-exc-3.exp: Use foreach_with_prefix. ++ (do_test): Don't use with_test_prefix. ++ * gdb.threads/non-ldr-exc-4.exp: Use foreach_with_prefix. ++ (do_test): Don't use with_test_prefix. ++ ++2020-12-01 Simon Marchi ++ ++ * gdb.threads/non-ldr-exit.exp: Fix comment. ++ ++2020-12-01 Andrew Burgess ++ ++ * gdb.xml/maint-xml-dump-03.xml: New file. ++ ++2020-11-30 Tom de Vries ++ ++ PR symtab/26905 ++ * gdb.dwarf2/count.exp: Remove kfails. ++ ++2020-11-24 Tankut Baris Aktemur ++ ++ * gdb.base/condbreak-multi-context.exp: Do not hard-code location ++ indices. ++ ++2020-11-24 Joel Brobecker ++ ++ * gdb.dwarf2/dw2-fixed-point.exp: Fix the expected output of ++ the "ptype pck__fp1_range_var" test for the module-2 and pascal ++ languages. Remove the associated setup_xfail. ++ ++2020-11-23 Simon Marchi ++ ++ * lib/gdb.exp (gdb_assert): Show error message on error. ++ ++2020-11-23 Tom de Vries ++ ++ * gdb.ada/enum_idx_packed.exp: Limit setup_kfail to gnat 9 and 10. ++ * gdb.ada/mod_from_name.exp: Same. ++ * gdb.ada/pckd_arr_ren.exp: Same. ++ ++2020-11-22 Simon Marchi ++ ++ * gdb.base/template.exp: New. ++ * gdb.base/template.c: New. ++ ++2020-11-22 Gary Benson ++ ++ PR gdb/26905 ++ * gdb.dwarf2/count.exp: Add test for an array whose upper bound ++ is defined using a DW_AT_count which references another DIE. ++ ++2020-11-21 Tom de Vries ++ ++ * gdb.base/vla-ptr.exp: Add XFAIL. ++ ++2020-11-19 Andrew Burgess ++ ++ * gdb.fortran/array-slices-bad.exp: New file. ++ * gdb.fortran/array-slices-bad.f90: New file. ++ * gdb.fortran/array-slices-sub-slices.exp: New file. ++ * gdb.fortran/array-slices-sub-slices.f90: New file. ++ * gdb.fortran/array-slices.exp: Rewrite tests. ++ * gdb.fortran/array-slices.f90: Rewrite tests. ++ * gdb.fortran/vla-sizeof.exp: Correct expected results. ++ ++2020-11-19 Andrew Burgess ++ ++ * gdb.base/completion.exp: Add new completion tests. ++ ++2020-11-18 Simon Marchi ++ ++ * gdb.mi/mi-nonstop-exit.exp: Enable non-stop through GDBFLAGS. ++ * gdb.mi/mi-ns-stale-regcache.exp: Likewise. ++ * gdb.mi/mi-nsintrall.exp: Likewise. ++ * gdb.mi/mi-nsmoribund.exp: Likewise. ++ * gdb.mi/mi-nsthrexec.exp: Likewise. ++ * gdb.mi/mi-watch-nonstop.exp: Likewise. ++ ++2020-11-18 Simon Marchi ++ ++ * lib/mi-support.exp (mi_run_cmd_full): Use unresovled instead ++ of perror. ++ ++2020-11-18 Joseph Myers ++ ++ * lib/mi-support.exp (mi_gdb_file_cmd): Check for case where ++ $arg.exe exists but $arg does not. ++ ++2020-11-17 Gary Benson ++ ++ * gdb.trace/trace-common.h (x86_trace_dummy): Add ++ __attribute__ ((used)). ++ ++2020-11-17 Andrew Burgess ++ ++ * gdb.gdb/unittest.exp: Spot 'Running...' lines. ++ ++2020-11-17 Andrew Burgess ++ ++ * gdb.base/completion.exp: Add new tests. ++ ++2020-11-16 Tom Tromey ++ ++ * gdb.dwarf2/data-loc.exp: Update expected output. Remove C ++ tests. ++ ++2020-11-15 Joel Brobecker ++ ++ * gdb.ada/fixed_cmp.exp: Add -fgnat-encodings=minimal testing. ++ * gdb.dwarf2/dw2-fixed-point.c (pck__fp1_var2): New global. ++ (main): Add reference to pck__fp1_var2. ++ * gdb.dwarf2/dw2-fixed-point.exp: Add comparison operator testing. ++ ++2020-11-15 Joel Brobecker ++ ++ * gdb.dwarf2/dw2-fixed-point.exp: Add arithmetic tests. ++ ++2020-11-15 Joel Brobecker ++ ++ * gdb.ada/fixed_points.exp: Add ptype tests. ++ * gdb.dwarf2/dw2-fixed-point.exp: Likewise. ++ ++2020-11-15 Joel Brobecker ++ ++ * gdb.dwarf2/dw2-fixed-point.exp: Add "print /x" tests. ++ ++2020-11-15 Joel Brobecker ++ ++ * gdb.ada/fixed_cmp.exp: Force compilation to use -fgnat-encodings=all. ++ * gdb.ada/fixed_points.exp: Add fixed-point variables printing tests. ++ * gdb.ada/fixed_points/pck.ads, gdb.ada/fixed_points/pck.adb: ++ New files. ++ * gdb.ada/fixed_points/fixed_points.adb: Add use of package Pck. ++ ++ * gdb.dwarf2/dw2-fixed-point.c, gdb.dwarf2/dw2-fixed-point.exp: ++ New files. ++ ++2020-11-14 Andrew Burgess ++ ++ PR cli/26879 ++ * gdb.fortran/completion.exp: New file. ++ * gdb.fortran/completion.f90: New file. ++ ++2020-11-12 Joseph Myers ++ ++ * lib/gdb.exp (gdb_file_cmd): Check for case where $arg.exe exists ++ but $arg does not. ++ ++2020-11-12 Andrew Burgess ++ ++ * gdb.fortran/types.exp: Add more tests. ++ ++2020-11-12 Tom Tromey ++ ++ PR rust/26799: ++ * gdb.rust/traits.exp: Remove kfails. ++ ++2020-11-12 Gary Benson ++ ++ * gdb.threads/tls-so_extern_main.c (tls_ptr): Add missing return ++ statement. ++ ++2020-11-11 Simon Marchi ++ ++ * gdb.base/continue-after-aborted-step-over.exp: Add "breakpoint ++ always-inserted" axis. ++ (do_test): Add breakpoint_always_inserted parameter. ++ ++2020-11-10 Tom Tromey ++ ++ * gdb.ada/bias.exp: Update. ++ * gdb.ada/bias/bias.adb (X): Change value. ++ ++2020-11-10 Gary Benson ++ ++ * gdb.base/vla-optimized-out.exp (p sizeof (a)): Wrap supplied ++ regexp fragment in parentheses to prevent false matching. ++ ++2020-11-10 Gary Benson ++ ++ * gdb.base/vla-optimized-out.c (f1): Add __attribute__ ((weak)). ++ ++2020-11-10 Gary Benson ++ ++ * gdb.cp/step-and-next-inline.exp: Only require ++ -gstatement-frontiers when building with GCC. ++ Only setup KFAIL's for GCC issues when using ++ a GCC-built executable. ++ ++2020-11-06 Andrew Burgess ++ ++ * gdb.base/debug-expr.c: Add extra function to allow for an ++ additional test. ++ * gdb.base/debug-expr.exp (test_debug_expr): Delete, replace calls ++ to this proc with gdb_test_debug_expr. Add an extra test. ++ * gdb.cp/debug-expr.exp (test_debug_expr): Delete, replace calls ++ to this proc with gdb_test_debug_expr, give the tests names ++ * gdb.dlang/debug-expr.exp (test_debug_expr): Delete, replace ++ calls to this proc with gdb_test_debug_expr, give the tests names ++ * gdb.fortran/debug-expr.exp: New file. ++ * gdb.fortran/debug-expr.f90: New file. ++ * lib/gdb.exp (gdb_test_debug_expr): New proc. ++ ++2020-11-06 Simon Marchi ++ ++ * lib/dwarf.exp (ranges): Handle "base" and "range" as ++ proceduresu. ++ * gdb.dwarf/dw2-bad-elf.exp: Adjust. ++ * gdb.dwarf2/dw2-inline-many-frames.exp: Adjust. ++ * gdb.dwarf2/dw2-inline-stepping.exp: Adjust. ++ * gdb.dwarf2/dw2-ranges-base.exp: Adjust. ++ * gdb.dwarf2/dw2-ranges-func.exp: Adjust. ++ * gdb.dwarf2/dw2-ranges-overlap.exp: Adjust. ++ * gdb.dwarf2/dw2-ranges-psym.exp: Adjust. ++ * gdb.dwarf2/enqueued-cu-base-addr.exp: Adjust. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/funcall_ref.exp: Update. ++ * gdb.ada/var_rec_arr.exp: Update. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/rec_ptype.exp: New file. ++ * gdb.ada/rec_ptype/main.adb: New file. ++ * gdb.ada/rec_ptype/p.ads: New file. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/tick_length_array_enum_idx.exp: Add ptype test. ++ * gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb ++ (PT_Full): New variable. ++ * gdb.ada/tick_length_array_enum_idx/pck.adb ++ (Full_PT): New type. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/array_of_variant.exp: New file. ++ * gdb.ada/array_of_variant/p.adb: New file. ++ * gdb.ada/array_of_variant/pck.ads: New file. ++ * gdb.ada/array_of_variant/pck.adb: New file. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/enum_idx_packed.exp: Add test. ++ * gdb.ada/enum_idx_packed/foo.adb (Multi_Access): ++ New variable. ++ * gdb.ada/enum_idx_packed/pck.ads (Short) ++ (Multi_Dimension, Multi_Dimension_Access): New types. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/enum_idx_packed.exp: Test two forms of -fgnat-encodings. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/set_pckd_arr_elt.exp: Also test ++ -fgnat-encodings=minimal. Add tests. ++ * gdb.ada/set_pckd_arr_elt/foo.adb (Foo): Add VA variable. ++ Call Update_Small a second time. ++ * gdb.ada/set_pckd_arr_elt/pck.adb (New_Variant): New function. ++ * gdb.ada/set_pckd_arr_elt/pck.ads (Buffer, Variant) ++ (Variant_Access): New types. ++ (New_Variant): Declare. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/mod_from_name.exp: Test printing slice. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/O2_float_param.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/access_to_unbounded_array.exp: Test different ++ -fgnat-encodings values. ++ * gdb.ada/big_packed_array.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/arr_enum_idx_w_gap.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/array_ptr_renaming.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/array_of_variable_length.exp: Test different ++ -fgnat-encodings values. ++ * gdb.ada/arrayparam.exp: Test different -fgnat-encodings values. ++ * gdb.ada/arrayptr.exp: Test different -fgnat-encodings values. ++ * gdb.ada/frame_arg_lang.exp: Revert -fgnat-encodings=minimal ++ change. ++ * gdb.ada/mi_string_access.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/mod_from_name.exp: Test different -fgnat-encodings values. ++ * gdb.ada/out_of_line_in_inlined.exp: Test different ++ -fgnat-encodings values. ++ * gdb.ada/packed_array.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/pckd_arr_ren.exp: Test different -fgnat-encodings ++ values. ++ * gdb.ada/unc_arr_ptr_in_var_rec.exp: Test different ++ -fgnat-encodings values. ++ * gdb.ada/variant_record_packed_array.exp: Test different ++ -fgnat-encodings values. ++ ++2020-11-04 Tom Tromey ++ ++ * gdb.ada/enum_idx_packed.exp: Add tests. ++ * gdb.ada/enum_idx_packed/foo.adb: Add variables. ++ * gdb.ada/enum_idx_packed/pck.adb: Add functions. ++ * gdb.ada/enum_idx_packed/pck.ads: Add types, function ++ declarations. ++ ++2020-11-03 Tom de Vries ++ ++ * lib/dwarf.exp (Dwarf::_handle_DW_TAG): Improve attribute list ++ terminator comments. ++ (Dwarf::cu, Dwarf::tu): Remove superfluous abbreviation table ++ terminator. ++ ++2020-11-02 Simon Marchi ++ ++ * gdb.base/step-over-no-symbols.exp (test_step_over): Replace ++ integer format test with regexp. ++ ++2020-11-02 Gary Benson ++ ++ * gdb.base/print-file-var.exp (test): Separate compiler and ++ linker options, and build using build_executable_from_specs ++ to accommodate this. ++ ++2020-11-02 Gary Benson ++ ++ * lib/gdb.exp (gdb_compile): Inhibit passing "-x c++" ++ for .c files compiled as C++ with Clang if any shared ++ libraries are specified. ++ ++2020-11-02 Gary Benson ++ ++ * lib/attributes.h: New header. ++ * gdb.base/backtrace.c: Include the above. Replace ++ __attribute__(noclone)) with ATTRIBUTE_NOCLONE. ++ * gdb.base/infcall-nested-structs.c: Likewise. ++ * gdb.base/vla-optimized-out.c: Likewise. ++ ++2020-11-02 Tom de Vries ++ ++ * gdb.dwarf2/fission-multi-cu.S: Remove .debug_line.dwo section. ++ ++2020-11-01 Joel Brobecker ++ ++ * gdb.ada/fixed_points/fixed_points.adb: Replace use of ++ System.Min_Int and System.Max_Int with smaller hardcoded ++ constants. ++ ++2020-10-31 Simon Marchi ++ ++ * configure.ac: Split AC_INIT into AC_INIT and AC_CONFIG_SRCDIR. ++ * configure: Re-generate. ++ ++2020-10-30 Simon Marchi ++ ++ * gdb.arch/amd64-disp-step-avx.exp: Update displaced step debug ++ expected output. ++ ++2020-10-30 Tankut Baris Aktemur ++ ++ * gdb.base/paginate-after-ctrl-c-running.exp: Update with no pagination ++ behavior. ++ * gdb.base/paginate-bg-execution.exp: Ditto. ++ * gdb.base/paginate-inferior-exit.exp: Ditto. ++ * gdb.base/double-prompt-target-event-error.c: Remove. ++ * gdb.base/double-prompt-target-event-error.exp: Remove. ++ ++2020-10-29 Tankut Baris Aktemur ++ ++ * gdb.base/kill-detach-inferiors-cmd.exp: Check that 'kill ++ inferiors' and 'detach inferiors' do not change the current ++ inferior. ++ ++2020-10-29 Tom de Vries ++ ++ * gdb.threads/tls.exp: Fix DUPLICATEs. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.python/py-symbol.exp: Add KFAILs for -readnow. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.ada/exec_changed.exp: Add KFAILs for -readnow. ++ * gdb.base/reread.exp: Same. ++ ++2020-10-28 Tom de Vries ++ ++ * lib/gdb.exp (readnow): Handle arg. ++ * gdb.rust/traits.exp: Add KFAILs for -readnow. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.base/relocate.exp: Update regexp for -readnow. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.dwarf2/dw2-error.exp: Mark failure break in main as known with ++ -readnow. ++ ++2020-10-28 Tom de Vries ++ ++ PR symtab/26772 ++ * gdb.dwarf2/dw2-ranges-overlap.c: New test. ++ * gdb.dwarf2/dw2-ranges-overlap.exp: New file. ++ ++2020-10-28 Tom de Vries ++ ++ * lib/gdb.exp (gdb_file_cmd): Set gdb_file_cmd_msg. ++ * gdb.cp/nsalias.exp: Set complaints limit before file cmd. Expect ++ complaint during file command for -readnow. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.cp/nsalias.exp: Fix typo in test name. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.dwarf2/dw2-filename.exp: Update regexp for -readnow. ++ ++2020-10-28 Tom de Vries ++ ++ * gdb.dwarf2/dw2-stack-boundary.exp: KFAILing the complaints for ++ -readnow. ++ ++2020-10-27 Tom de Vries ++ ++ * gdb.base/multi-forks.exp: Use exp_continue to fix timeout. ++ ++2020-10-27 Tom de Vries ++ ++ * gdb.base/maint.exp: Update for -readnow. ++ ++2020-10-27 Tom de Vries ++ ++ * gdb.cp/psymtab-parameter.exp: Don't expect unexpanded CU for ++ -readnow. ++ ++2020-10-14 Gary Benson ++ ++ * gdb.python/py-format-string.exp (test_deref_refs): Treat ++ "_vptr$Base" as correct, in addition to "_vptr.Base". ++ (test_mixed): Likewise. ++ ++2020-10-27 Gary Benson ++ ++ * gdb.mi/mi-fortran-modules.exp: Check skip_fortran_tests. ++ * gdb.mi/mi-vla-fortran.exp: Likewise. Also fix a comment. ++ ++2020-10-27 Tankut Baris Aktemur ++ ++ * gdb.base/condbreak.exp: Update the completion tests to ++ consider the '-force' flag. ++ ++2020-10-27 Tom de Vries ++ ++ * gdb.base/list-ambiguous-readnow.exp: New file. ++ ++2020-10-27 Tankut Baris Aktemur ++ ++ * gdb.base/condbreak-multi-context.exp: Expand to test forcing ++ the condition. ++ * gdb.linespec/cpcompletion.exp: Update to consider the ++ '-force-condition' keyword. ++ * gdb.linespec/explicit.exp: Ditto. ++ * lib/completion-support.exp: Ditto. ++ ++2020-10-27 Tankut Baris Aktemur ++ ++ * gdb.base/condbreak-multi-context.cc: New file. ++ * gdb.base/condbreak-multi-context.exp: New file. ++ ++2020-10-26 Tom Tromey ++ ++ * lib/mi-support.exp (default_mi_gdb_start): Call ++ gdb_stdin_log_init. ++ * lib/gdb.exp (standard_output_file_with_gdb_instance): Don't ++ subtract one from gdb_instances. ++ (gdb_stdin_log_write): Flush in_file. ++ ++2020-10-26 Tom de Vries ++ ++ * gdb.dwarf2/enqueued-cu-base-addr.exp: New file. ++ ++2020-10-26 Tom Tromey ++ ++ * gdb.ada/unsigned_range/foo.adb: New file. ++ * gdb.ada/unsigned_range/pack.adb: New file. ++ * gdb.ada/unsigned_range/pack.ads: New file. ++ * gdb.ada/unsigned_range.exp: New file. ++ ++2020-10-26 Tom de Vries ++ ++ * lib/gdb.exp (INTERNAL_GDBFLAGS): Set heigth and width. ++ ++2020-10-26 Tom de Vries ++ ++ * gdb.dwarf2/dw2-objfile-overlap-inner.S: Specify default base address ++ for CU. ++ * gdb.dwarf2/dw2-objfile-overlap-outer.S: Same. ++ ++2020-10-23 Tom de Vries ++ ++ * lib/dwarf.exp (Dwarf::_guess_form): Return "" by default instead of ++ DW_FORM_string. ++ (Dwarf::_default_form): New proc. ++ (Dwarf::_handle_DW_TAG): Use _default_form. Error out if no form was ++ guessed. ++ ++2020-10-23 Tom de Vries ++ ++ * gdb.dwarf2/ada-linkage-name.exp: Use $srcfile for DW_AT_name of CU. ++ * gdb.dwarf2/atomic-type.exp: Same. ++ * gdb.dwarf2/bad-regnum.exp: Same. ++ * gdb.dwarf2/cpp-linkage-name.exp: Same. ++ * gdb.dwarf2/dw2-align.exp: Same. ++ * gdb.dwarf2/dw2-bad-elf.exp: Same. ++ * gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Same. ++ * gdb.dwarf2/dw2-bad-unresolved.exp: Same. ++ * gdb.dwarf2/dw2-namespaceless-anonymous.exp: Same. ++ * gdb.dwarf2/dw2-opt-structptr.exp: Same. ++ * gdb.dwarf2/dw2-unusual-field-names.exp: Same. ++ * gdb.dwarf2/enum-type.exp: Same. ++ * gdb.dwarf2/frame-inlined-in-outer-frame.exp: Same. ++ * gdb.dwarf2/info-locals-optimized-out.exp: Same. ++ * gdb.dwarf2/main-subprogram.exp: Same. ++ * gdb.dwarf2/missing-type-name.exp: Same. ++ * gdb.dwarf2/nonvar-access.exp: Same. ++ * gdb.dwarf2/typedef-void-finish.exp: Same. ++ * gdb.dwarf2/var-access.exp: Same. ++ * gdb.dwarf2/void-type.exp: Same. ++ ++2020-10-22 Simon Marchi ++ ++ PR gdb/26693 ++ * gdb.dwarf2/template-specification-full-name.exp: New test. ++ ++2020-10-22 Luis Machado ++ ++ * gdb.base/msym-bp-shl.exp (test_break): Adjust pattern to not ++ expected an offset from the function. ++ * gdb.base/msym-bp.exp (test): Likewise. ++ ++2020-10-22 Andrew Burgess ++ ++ * gdb.fortran/array-slices.exp: Add a new test. ++ ++2020-10-21 Gary Benson ++ ++ * gdb.mi/mi-fullname-deleted.exp: Fix substituted ++ fullname test with Clang. Also expand comments generally. ++ ++ * gdb.python/flexible-array-member.exp: Add check for Python ++ support. + + 2021-04-22 Simon Marchi + +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/arc-disassembler-options.exp +@@ -0,0 +1,45 @@ ++# Copyright 2021 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++# Test ARC disassembler options. ++ ++if { ![istarget "arc-*-*"] } then { ++ verbose "Skipping ARC disassembler option test." ++ return ++} ++ ++standard_testfile .s ++set objfile [standard_output_file ${testfile}.o] ++ ++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {}] \ ++ != "" } { ++ return ++} ++ ++clean_restart ${objfile} ++ ++proc arc_disassemble_test { func insn mesg } { ++ gdb_test "disassemble $func" \ ++ "Dump of assembler code for function $func:\r\n\ ++ \[^:\]+:\t$insn\r\nEnd of assembler dump\." \ ++ $mesg ++} ++ ++# Verify defaults. ++arc_disassemble_test foo "lr\tr0,\\\[tlbpd0\\\]" "disassemble default" ++ ++# Verify option overrides. ++gdb_test "set disassembler-options cpu=arcem" ++arc_disassemble_test foo "lr\tr0,\\\[1120\\\]" "disassemble cpu=arcem" +--- /dev/null ++++ b/gdb/testsuite/gdb.arch/arc-disassembler-options.s +@@ -0,0 +1,21 @@ ++# This test is part of GDB, the GNU debugger. ++# ++# Copyright 2021 Free Software Foundation, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++.globl foo ++foo: ++ lr r0, [tlbpd0] ++.end foo diff --git a/packages/gdb/10.2/0015-gdb-Fix-numerical-field-extraction-for-target-descri.patch b/packages/gdb/10.2/0015-gdb-Fix-numerical-field-extraction-for-target-descri.patch new file mode 100644 index 0000000..ba510bd --- /dev/null +++ b/packages/gdb/10.2/0015-gdb-Fix-numerical-field-extraction-for-target-descri.patch @@ -0,0 +1,101 @@ +From b99b999fc7a0d0888b62e3bdedd0b4855bdf955c Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Fri, 16 Jul 2021 16:49:15 +0200 +Subject: [PATCH 18/20] gdb: Fix numerical field extraction for target + description "flags" + +The "val_print_type_code_flags ()" function is responsible for +extraction of fields for "flags" data type. These data types are +used when describing a custom register type in a target description +XML. The logic used for the extraction though is not sound: + + unsigned field_len = TYPE_FIELD_BITSIZE (type, field); + ULONGEST field_val + = val >> (TYPE_FIELD_BITPOS (type, field) - field_len + 1); + +TYPE_FIELD_BITSIZE: The bit length of the field to be extracted. +TYPE_FIELD_BITPOS: The starting position of the field; 0 is LSB. +val: The register value. + +Imagine you have a field that starts at position 1 and its length +is 4 bits. According to the third line of the code snippet the +shifting right would become "val >> -2", or "val >> 0xfff...fe" +to be precise. That will result in a "field_val" of 0. + +The correct extraction should be: + + ULONGEST field_val = val >> TYPE_FIELD_BITPOS (type, field); + +The rest of the algorithm that masks out the higher bits is OK. + +Co-Authored-By: Simon Marchi + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=c9bd98593b785d9bf5f39c7aa74ed0226a23b830 +--- + gdb/valprint.c | 36 ++++++++++++++++++++++++++++++++++-- + 1 file changed, 34 insertions(+), 2 deletions(-) + +--- a/gdb/valprint.c ++++ b/gdb/valprint.c +@@ -40,6 +40,8 @@ + #include "gdbarch.h" + #include "cli/cli-style.h" + #include "count-one-bits.h" ++#include "gdbsupport/selftest.h" ++#include "selftest-arch.h" + + /* Maximum number of wchars returned from wchar_iterate. */ + #define MAX_WCHARS 4 +@@ -1157,8 +1159,7 @@ + else + { + unsigned field_len = TYPE_FIELD_BITSIZE (type, field); +- ULONGEST field_val +- = val >> (TYPE_FIELD_BITPOS (type, field) - field_len + 1); ++ ULONGEST field_val = val >> TYPE_FIELD_BITPOS (type, field); + + if (field_len < sizeof (ULONGEST) * TARGET_CHAR_BIT) + field_val &= ((ULONGEST) 1 << field_len) - 1; +@@ -3100,10 +3101,41 @@ + return {{value_print_option_defs}, opts}; + } + ++#if GDB_SELF_TEST ++ ++/* Test printing of TYPE_CODE_FLAGS values. */ ++ ++static void ++test_print_flags (gdbarch *arch) ++{ ++ type *flags_type = arch_flags_type (arch, "test_type", 32); ++ type *field_type = builtin_type (arch)->builtin_uint32; ++ ++ /* Value: 1010 1010 ++ Fields: CCCB BAAA */ ++ append_flags_type_field (flags_type, 0, 3, field_type, "A"); ++ append_flags_type_field (flags_type, 3, 2, field_type, "B"); ++ append_flags_type_field (flags_type, 5, 3, field_type, "C"); ++ ++ value *val = allocate_value (flags_type); ++ gdb_byte *contents = value_contents_writeable (val); ++ store_unsigned_integer (contents, 4, gdbarch_byte_order (arch), 0xaa); ++ ++ string_file out; ++ val_print_type_code_flags (flags_type, val, 0, &out); ++ SELF_CHECK (out.string () == "[ A=2 B=1 C=5 ]"); ++} ++ ++#endif ++ + void _initialize_valprint (); + void + _initialize_valprint () + { ++#if GDB_SELF_TEST ++ selftests::register_test_foreach_arch ("print-flags", test_print_flags); ++#endif ++ + cmd_list_element *cmd; + + add_basic_prefix_cmd ("print", no_class, diff --git a/packages/gdb/10.2/0016-gdb-Make-the-builtin-boolean-type-an-unsigned-type.patch b/packages/gdb/10.2/0016-gdb-Make-the-builtin-boolean-type-an-unsigned-type.patch new file mode 100644 index 0000000..3d2d8c0 --- /dev/null +++ b/packages/gdb/10.2/0016-gdb-Make-the-builtin-boolean-type-an-unsigned-type.patch @@ -0,0 +1,157 @@ +From 440ea08bbf4c81f97852785642c6a6f18bdd28a9 Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Mon, 19 Jul 2021 16:13:47 +0200 +Subject: [PATCH 19/20] gdb: Make the builtin "boolean" type an unsigned type + +When printing the fields of a register that is of a custom struct type, +the "unpack_bits_as_long ()" function is used: + + do_val_print (...) + cp_print_value_fields (...) + value_field_bitfield (...) + unpack_value_bitfield (...) + unpack_bits_as_long (...) + +This function may sign-extend the extracted field while returning it: + + val >>= lsbcount; + + if (...) + { + valmask = (((ULONGEST) 1) << bitsize) - 1; + val &= valmask; + if (!field_type->is_unsigned ()) + if (val & (valmask ^ (valmask >> 1))) + val |= ~valmask; + } + + return val; + +lsbcount: Number of lower bits to get rid of. +bitsize: The bit length of the field to be extracted. +val: The register value. +field_type: The type of field that is being handled. + +While the logic here is correct, there is a problem when it is +handling "field_type"s of "boolean". Those types are NOT marked +as "unsigned" and therefore they end up being sign extended. +Although this is not a problem for "false" (0), it definitely +causes trouble for "true". + +This patch constructs the builtin boolean type as such that it is +marked as an "unsigned" entity. + +The issue tackled here was first encountered for arc-elf32 target +running on an x86_64 machine. The unit-test introduced in this change +has passed for all the targets (--enable-targets=all) running on the +same x86_64 host. + +Fixes: https://sourceware.org/PR28104 + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=91254b918f1b35359d44b567a15013c42a931460 +--- + gdb/cp-valprint.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + gdb/gdbtypes.c | 2 - + 2 files changed, 69 insertions(+), 1 deletion(-) + +--- a/gdb/cp-valprint.c ++++ b/gdb/cp-valprint.c +@@ -38,6 +38,8 @@ + #include "gdbsupport/byte-vector.h" + #include "gdbarch.h" + #include "cli/cli-style.h" ++#include "gdbsupport/selftest.h" ++#include "selftest-arch.h" + + static struct obstack dont_print_vb_obstack; + static struct obstack dont_print_statmem_obstack; +@@ -721,11 +723,77 @@ + fprintf_filtered (stream, "%ld", (long) val); + } + ++#if GDB_SELF_TEST ++ ++/* Test printing of TYPE_CODE_STRUCT values. */ ++ ++static void ++test_print_fields (gdbarch *arch) ++{ ++ struct field *f; ++ type *uint8_type = builtin_type (arch)->builtin_uint8; ++ type *bool_type = builtin_type (arch)->builtin_bool; ++ type *the_struct = arch_composite_type (arch, NULL, TYPE_CODE_STRUCT); ++ TYPE_LENGTH (the_struct) = 4; ++ ++ /* Value: 1110 1001 ++ Fields: C-BB B-A- */ ++ if (gdbarch_byte_order (arch) == BFD_ENDIAN_LITTLE) ++ { ++ f = append_composite_type_field_raw (the_struct, "A", bool_type); ++ SET_FIELD_BITPOS (*f, 1); ++ FIELD_BITSIZE (*f) = 1; ++ f = append_composite_type_field_raw (the_struct, "B", uint8_type); ++ SET_FIELD_BITPOS (*f, 3); ++ FIELD_BITSIZE (*f) = 3; ++ f = append_composite_type_field_raw (the_struct, "C", bool_type); ++ SET_FIELD_BITPOS (*f, 7); ++ FIELD_BITSIZE (*f) = 1; ++ } ++ /* According to the logic commented in "make_gdb_type_struct ()" of ++ * target-descriptions.c, bit positions are numbered differently for ++ * little and big endians. */ ++ else ++ { ++ f = append_composite_type_field_raw (the_struct, "A", bool_type); ++ SET_FIELD_BITPOS (*f, 30); ++ FIELD_BITSIZE (*f) = 1; ++ f = append_composite_type_field_raw (the_struct, "B", uint8_type); ++ SET_FIELD_BITPOS (*f, 26); ++ FIELD_BITSIZE (*f) = 3; ++ f = append_composite_type_field_raw (the_struct, "C", bool_type); ++ SET_FIELD_BITPOS (*f, 24); ++ FIELD_BITSIZE (*f) = 1; ++ } ++ ++ value *val = allocate_value (the_struct); ++ gdb_byte *contents = value_contents_writeable (val); ++ store_unsigned_integer (contents, TYPE_LENGTH (value_enclosing_type (val)), ++ gdbarch_byte_order (arch), 0xe9); ++ ++ string_file out; ++ struct value_print_options opts; ++ get_no_prettyformat_print_options (&opts); ++ cp_print_value_fields(val, &out, 0, &opts, NULL, 0); ++ SELF_CHECK (out.string () == "{A = false, B = 5, C = true}"); ++ ++ out.clear(); ++ opts.format = 'x'; ++ cp_print_value_fields(val, &out, 0, &opts, NULL, 0); ++ SELF_CHECK (out.string () == "{A = 0x0, B = 0x5, C = 0x1}"); ++} ++ ++#endif ++ + + void _initialize_cp_valprint (); + void + _initialize_cp_valprint () + { ++#if GDB_SELF_TEST ++ selftests::register_test_foreach_arch ("print-fields", test_print_fields); ++#endif ++ + obstack_begin (&dont_print_stat_array_obstack, + 32 * sizeof (struct type *)); + obstack_begin (&dont_print_statmem_obstack, +--- a/gdb/gdbtypes.c ++++ b/gdb/gdbtypes.c +@@ -5854,7 +5854,7 @@ + builtin_type->builtin_string + = arch_type (gdbarch, TYPE_CODE_STRING, TARGET_CHAR_BIT, "string"); + builtin_type->builtin_bool +- = arch_type (gdbarch, TYPE_CODE_BOOL, TARGET_CHAR_BIT, "bool"); ++ = arch_boolean_type (gdbarch, TARGET_CHAR_BIT, 1, "bool"); + + /* The following three are about decimal floating point types, which + are 32-bits, 64-bits and 128-bits respectively. */ diff --git a/packages/gdb/10.2/0017-opcodes-Fix-the-auxiliary-register-numbers-for-ARC-H.patch b/packages/gdb/10.2/0017-opcodes-Fix-the-auxiliary-register-numbers-for-ARC-H.patch new file mode 100644 index 0000000..41c0a80 --- /dev/null +++ b/packages/gdb/10.2/0017-opcodes-Fix-the-auxiliary-register-numbers-for-ARC-H.patch @@ -0,0 +1,40 @@ +From 3f3e3620f54b17d6ba78046f45e05dffe2bf940d Mon Sep 17 00:00:00 2001 +From: Shahab Vahedi +Date: Tue, 17 Aug 2021 16:39:26 +0200 +Subject: [PATCH 20/20] opcodes: Fix the auxiliary register numbers for ARC HS + +The numbers for the auxiliary registers "tlbindex" and +"tlbcommand" of ARCv2HS are incorrect. This patch makes +the following changes to correct that error. + + ,------------.-----------------.---------------. + | aux. reg. | old (incorrect) | new (correct) | + |------------+-----------------+---------------| + | tlbindex | 0x463 | 0x464 | + | tlbcommand | 0x464 | 0x465 | + `------------^-----------------^---------------' + +opcodes/ +2021-08-17 Shahab Vahedi + + * arc-regs.h (DEF): Fix the register numbers. + +Will be a part of GDB 11: +https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=5d9cff510e8c04ded28272ef2121d814f5787a57 +--- + opcodes/arc-regs.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/opcodes/arc-regs.h ++++ b/opcodes/arc-regs.h +@@ -346,8 +346,8 @@ + DEF (0x453, ARC_OPCODE_ARC600, NONE, pwr_ctrl) + DEF (0x460, ARC_OPCODE_ARCv2HS, NONE, tlbpd0) + DEF (0x461, ARC_OPCODE_ARCv2HS, NONE, tlbpd1) +-DEF (0x463, ARC_OPCODE_ARCv2HS, NONE, tlbindex) +-DEF (0x464, ARC_OPCODE_ARCv2HS, NONE, tlbcommand) ++DEF (0x464, ARC_OPCODE_ARCv2HS, NONE, tlbindex) ++DEF (0x465, ARC_OPCODE_ARCv2HS, NONE, tlbcommand) + DEF (0x468, ARC_OPCODE_ARCv2HS, NONE, pid) + DEF (0x46c, ARC_OPCODE_ARCv2HS, NONE, scratch_data0) + DEF (0x500, ARC_OPCODE_ARC700, NONE, aux_vlc_buf_idx) -- cgit v0.10.2-6-g49f6