[gentoo-commits] repo/gentoo:master commit in: dev-debug/gdb/files/

2024-05-24 Thread Conrad Kostecki
commit: 08c5262b636f1cc983089ba332470e6256e9e8ea
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Sun May 19 10:51:13 2024 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Fri May 24 23:35:14 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08c5262b

dev-debug/gdb: remove unused patches

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../files/gdb-14.1-fix-dll-export-forwarding.patch |  60 
 .../gdb/files/gdb-14.1-fix-list-segfault.patch | 101 ---
 .../gdb-14.1-fix-print-global-variable-stubs.patch | 109 -
 3 files changed, 270 deletions(-)

diff --git a/dev-debug/gdb/files/gdb-14.1-fix-dll-export-forwarding.patch 
b/dev-debug/gdb/files/gdb-14.1-fix-dll-export-forwarding.patch
deleted file mode 100644
index 8c2a49f8042f..
--- a/dev-debug/gdb/files/gdb-14.1-fix-dll-export-forwarding.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31112
-
-From 
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=43a608adb04251be8999304cf724f55b2d840ac3
-From: Hannes Domani 
-Date: Wed, 6 Dec 2023 20:52:06 +0100
-Subject: [PATCH] Fix DLL export forwarding
-
-I noticed it when I was trying to set a breakpoint at ExitProcess:
-```
-(gdb) b ExitProcess
-Breakpoint 1 at 0x14001fdd0
-(gdb) r
-Starting program: C:\qiewer\heob\heob64.exe
-Warning:
-Cannot insert breakpoint 1.
-Cannot access memory at address 0x3dbf4120
-Cannot insert breakpoint 1.
-Cannot access memory at address 0x77644120
-```
-
-The problem doesn't exist in gdb 13.2, and the difference can easily be
-seen when printing ExitProcess.
-gdb 14.1:
-```
-(gdb) p ExitProcess
-$1 = {} 0x77644120 
-```
-gdb 13.2:
-```
-(gdb) p ExitProcess
-$1 = {} 0x77734120 
-```
-
-The new behavior started with 9675da25357c7a3f472731ddc6eb3becc65b469a,
-where VMA was then calculated relative to FORWARD_DLL_NAME, while it was
-relative to DLL_NAME before.
-
-Fixed by calculating VMA relative to DLL_NAME again.
-
-Bug: https://sourceware.org/PR31112
-Approved-By: Tom Tromey 
-
-(cherry picked from commit 2574cd903dd84e7081506e24c2e232ecda11a736)
 a/gdb/coff-pe-read.c
-+++ b/gdb/coff-pe-read.c
-@@ -210,7 +210,10 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
- " \"%s\" in dll \"%s\", pointing to \"%s\"\n"),
-   sym_name, dll_name, forward_qualified_name.c_str ());
- 
--  unrelocated_addr vma = msymbol.minsym->unrelocated_address ();
-+  /* Calculate VMA as if it were relative to DLL_NAME/OBJFILE, even though
-+ it actually points inside another dll (FORWARD_DLL_NAME).  */
-+  unrelocated_addr vma = unrelocated_addr (msymbol.value_address ()
-+ - objfile->text_section_offset ());
-   msymtype = msymbol.minsym->type ();
-   section = msymbol.minsym->section_index ();
- 
--- 
-2.39.3
-

diff --git a/dev-debug/gdb/files/gdb-14.1-fix-list-segfault.patch 
b/dev-debug/gdb/files/gdb-14.1-fix-list-segfault.patch
deleted file mode 100644
index 76557b5a7e00..
--- a/dev-debug/gdb/files/gdb-14.1-fix-list-segfault.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Bug: https://bugs.gentoo.org/922336
-Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31256
-
-From 
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0068bd6fb3579dd8df7561e038cb3fe27f122b0e
-From: Guinevere Larsen 
-To: gdb-patc...@sourceware.org
-Cc: Guinevere Larsen 
-Subject: [PATCH] gdb: fix "list ." related crash
-Date: Tue, 23 Jan 2024 11:50:43 +0100
-
-When a user attempts to use the "list ." command with an inferior that
-doesn't have debug symbols, GDB would crash. This was reported as PR
-gdb/31256.
-
-The crash would happen when attempting to get the current symtab_and_line
-for the stop location, because the symtab would return a null pointer
-and we'd attempt to dereference it to print the line.
-
-This commit fixes that by checking for an empty symtab and erroring out
-of the function if it happens.
-
-Bug: https://sourceware.org/PR31256
 a/gdb/cli/cli-cmds.c
-+++ b/gdb/cli/cli-cmds.c
-@@ -1291,6 +1291,8 @@ list_command (const char *arg, int from_tty)
- set_default_source_symtab_and_line ();
- cursal = get_current_source_symtab_and_line ();
-   }
-+if (cursal.symtab == nullptr)
-+  error (_("No debug information available to print source lines."));
- list_around_line (arg, cursal);
- /* Set the repeat args so just pressing "enter" after using "list ."
-will print the following lines instead of the same lines again. */
 /dev/null
-+++ b/gdb/testsuite/gdb.base/list-nodebug.c
-@@ -0,0 +1,21 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2024 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General 

[gentoo-commits] repo/gentoo:master commit in: dev-debug/gdb/files/, dev-debug/gdb/

2024-05-22 Thread Sam James
commit: d6047265f563e8ba4deca92eb583eb0eb33ffcf9
Author: Sam James  gentoo  org>
AuthorDate: Wed May 22 19:23:01 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed May 22 19:23:01 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6047265

dev-debug/gdb: move c99 patch to devspace

Signed-off-by: Sam James  gentoo.org>

 dev-debug/gdb/Manifest|   1 +
 dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch | 765 --
 dev-debug/gdb/gdb-14.2-r1.ebuild  |   6 +-
 3 files changed, 4 insertions(+), 768 deletions(-)

diff --git a/dev-debug/gdb/Manifest b/dev-debug/gdb/Manifest
index 81b93c4c69ae..f07f85a7ddba 100644
--- a/dev-debug/gdb/Manifest
+++ b/dev-debug/gdb/Manifest
@@ -1 +1,2 @@
+DIST gdb-14.2-sim-modern-c99.patch.xz 5348 BLAKE2B 
f8039cdf1b49d12eead0dae7db88dbfad4c47eda696ee26b0bd140605d1d62d4a88557518d4e18c86fffb3c6194782d16e459f4392df71d2ec1af271ccb2838d
 SHA512 
f44239871c584f5d6de98db8d6a6766103a8a6fc92dada7d37f04bdc53efe635cca7dfaa778d620348559814f4784a33e5f72a8dd376dc96fba8ec27032ab389
 DIST gdb-14.2.tar.xz 24111936 BLAKE2B 
65765dfd1ed08e19bb881fc7ae98d6ee4914f38a9a2bb0d0ca73bef472669664f807fe9c04e8dffd7025be98e736ac52f88ff5851ceddbb01a361885b18befc8
 SHA512 
7e07941f1fe661288cc571b4964012ceabc1760624fce20320db2f470c01439b2386f859b5288da13204b758e2e3b22a74c68c012178db93b9529b06f1e22ede

diff --git a/dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch 
b/dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch
deleted file mode 100644
index d453785b22f9..
--- a/dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch
+++ /dev/null
@@ -1,765 +0,0 @@
-https://bugs.gentoo.org/871543
-https://bugs.gentoo.org/919121
-
-From 62695d59e35f1d199a6fc5ddd6f4e4fbd347a016 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger 
-Date: Thu, 7 Dec 2023 06:22:32 -0700
-Subject: [PATCH 1/6] sim: m32r: add more cgen prototypes to enable -Werror in
- most files
-
-(cherry picked from commit 5e43a46efc48eeb4951f498b227aee5eb71c137b)

- sim/Makefile.in | 11 ---
- sim/m32r/local.mk   | 11 ---
- sim/m32r/m32r-sim.h | 29 +++--
- 3 files changed, 27 insertions(+), 24 deletions(-)
-
-diff --git a/sim/Makefile.in b/sim/Makefile.in
-index 3dd14543450..00b5c2b91fa 100644
 a/sim/Makefile.in
-+++ b/sim/Makefile.in
-@@ -2471,17 +2471,6 @@ testsuite_common_CPPFLAGS = \
- # opc2c leaks memory, and therefore makes AddressSanitizer unhappy.  Disable
- # leak detection while running it.
- @SIM_ENABLE_ARCH_m32c_TRUE@m32c_OPC2C_RUN = ASAN_OPTIONS=detect_leaks=0 
m32c/opc2c$(EXEEXT)
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_cpu.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_cpu2.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_cpux.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_m32r.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_m32r2.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_m32rx.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_mloop.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_mloop2.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_mloopx.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_sem.o = -Wno-error
--@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_sim_if.o = -Wno-error
- @SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_traps.o = -Wno-error
- @SIM_ENABLE_ARCH_m32r_TRUE@nodist_m32r_libsim_a_SOURCES = \
- @SIM_ENABLE_ARCH_m32r_TRUE@   m32r/modules.c
-diff --git a/sim/m32r/local.mk b/sim/m32r/local.mk
-index db545675321..182d8879b43 100644
 a/sim/m32r/local.mk
-+++ b/sim/m32r/local.mk
-@@ -17,17 +17,6 @@
- ## along with this program.  If not, see .
- 
- ## Some modules don't build cleanly yet.
--AM_CFLAGS_%C%_cpu.o = -Wno-error
--AM_CFLAGS_%C%_cpu2.o = -Wno-error
--AM_CFLAGS_%C%_cpux.o = -Wno-error
--AM_CFLAGS_%C%_m32r.o = -Wno-error
--AM_CFLAGS_%C%_m32r2.o = -Wno-error
--AM_CFLAGS_%C%_m32rx.o = -Wno-error
--AM_CFLAGS_%C%_mloop.o = -Wno-error
--AM_CFLAGS_%C%_mloop2.o = -Wno-error
--AM_CFLAGS_%C%_mloopx.o = -Wno-error
--AM_CFLAGS_%C%_sem.o = -Wno-error
--AM_CFLAGS_%C%_sim_if.o = -Wno-error
- AM_CFLAGS_%C%_traps.o = -Wno-error
- 
- nodist_%C%_libsim_a_SOURCES = \
-diff --git a/sim/m32r/m32r-sim.h b/sim/m32r/m32r-sim.h
-index 0e1bf82ace5..c72be52e18a 100644
 a/sim/m32r/m32r-sim.h
-+++ b/sim/m32r/m32r-sim.h
-@@ -39,24 +39,42 @@
- 
- extern int m32r_decode_gdb_ctrl_regnum (int);
- 
-+/* The other cpu cores reuse m32rbf funcs to avoid duplication, but they don't
-+   provide externs to access, and we can't e.g. include decode.h in decodex.h
-+   because of all the redefinitions of cgen macros.  */
-+
-+extern void m32rbf_model_insn_before (SIM_CPU *, int);
-+extern void m32rbf_model_insn_after (SIM_CPU *, int, int);
-+extern CPUREG_FETCH_FN m32rbf_fetch_register;
-+extern CPUREG_STORE_FN m32rbf_store_register;
-+extern void m32rbf_h_cr_set (SIM_CPU *, UINT, USI);
-+

[gentoo-commits] repo/gentoo:master commit in: dev-debug/gdb/files/, dev-debug/gdb/

2024-05-22 Thread Sam James
commit: 6da14c98d133e6bf72d8a90b08ad798ca29e4ff3
Author: Gabi Falk  gmx  com>
AuthorDate: Fri May 17 19:30:00 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed May 22 19:19:31 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6da14c98

dev-debug/gdb: fix modern C issues

Closes: https://bugs.gentoo.org/871543
Closes: https://bugs.gentoo.org/919121
Signed-off-by: Gabi Falk  gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/36726
Signed-off-by: Sam James  gentoo.org>

 dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch | 765 ++
 dev-debug/gdb/gdb-14.2-r1.ebuild  | 323 +
 2 files changed, 1088 insertions(+)

diff --git a/dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch 
b/dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch
new file mode 100644
index ..d453785b22f9
--- /dev/null
+++ b/dev-debug/gdb/files/gdb-14.2-sim-modern-c99.patch
@@ -0,0 +1,765 @@
+https://bugs.gentoo.org/871543
+https://bugs.gentoo.org/919121
+
+From 62695d59e35f1d199a6fc5ddd6f4e4fbd347a016 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger 
+Date: Thu, 7 Dec 2023 06:22:32 -0700
+Subject: [PATCH 1/6] sim: m32r: add more cgen prototypes to enable -Werror in
+ most files
+
+(cherry picked from commit 5e43a46efc48eeb4951f498b227aee5eb71c137b)
+---
+ sim/Makefile.in | 11 ---
+ sim/m32r/local.mk   | 11 ---
+ sim/m32r/m32r-sim.h | 29 +++--
+ 3 files changed, 27 insertions(+), 24 deletions(-)
+
+diff --git a/sim/Makefile.in b/sim/Makefile.in
+index 3dd14543450..00b5c2b91fa 100644
+--- a/sim/Makefile.in
 b/sim/Makefile.in
+@@ -2471,17 +2471,6 @@ testsuite_common_CPPFLAGS = \
+ # opc2c leaks memory, and therefore makes AddressSanitizer unhappy.  Disable
+ # leak detection while running it.
+ @SIM_ENABLE_ARCH_m32c_TRUE@m32c_OPC2C_RUN = ASAN_OPTIONS=detect_leaks=0 
m32c/opc2c$(EXEEXT)
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_cpu.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_cpu2.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_cpux.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_m32r.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_m32r2.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_m32rx.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_mloop.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_mloop2.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_mloopx.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_sem.o = -Wno-error
+-@SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_sim_if.o = -Wno-error
+ @SIM_ENABLE_ARCH_m32r_TRUE@AM_CFLAGS_m32r_traps.o = -Wno-error
+ @SIM_ENABLE_ARCH_m32r_TRUE@nodist_m32r_libsim_a_SOURCES = \
+ @SIM_ENABLE_ARCH_m32r_TRUE@   m32r/modules.c
+diff --git a/sim/m32r/local.mk b/sim/m32r/local.mk
+index db545675321..182d8879b43 100644
+--- a/sim/m32r/local.mk
 b/sim/m32r/local.mk
+@@ -17,17 +17,6 @@
+ ## along with this program.  If not, see .
+ 
+ ## Some modules don't build cleanly yet.
+-AM_CFLAGS_%C%_cpu.o = -Wno-error
+-AM_CFLAGS_%C%_cpu2.o = -Wno-error
+-AM_CFLAGS_%C%_cpux.o = -Wno-error
+-AM_CFLAGS_%C%_m32r.o = -Wno-error
+-AM_CFLAGS_%C%_m32r2.o = -Wno-error
+-AM_CFLAGS_%C%_m32rx.o = -Wno-error
+-AM_CFLAGS_%C%_mloop.o = -Wno-error
+-AM_CFLAGS_%C%_mloop2.o = -Wno-error
+-AM_CFLAGS_%C%_mloopx.o = -Wno-error
+-AM_CFLAGS_%C%_sem.o = -Wno-error
+-AM_CFLAGS_%C%_sim_if.o = -Wno-error
+ AM_CFLAGS_%C%_traps.o = -Wno-error
+ 
+ nodist_%C%_libsim_a_SOURCES = \
+diff --git a/sim/m32r/m32r-sim.h b/sim/m32r/m32r-sim.h
+index 0e1bf82ace5..c72be52e18a 100644
+--- a/sim/m32r/m32r-sim.h
 b/sim/m32r/m32r-sim.h
+@@ -39,24 +39,42 @@
+ 
+ extern int m32r_decode_gdb_ctrl_regnum (int);
+ 
++/* The other cpu cores reuse m32rbf funcs to avoid duplication, but they don't
++   provide externs to access, and we can't e.g. include decode.h in decodex.h
++   because of all the redefinitions of cgen macros.  */
++
++extern void m32rbf_model_insn_before (SIM_CPU *, int);
++extern void m32rbf_model_insn_after (SIM_CPU *, int, int);
++extern CPUREG_FETCH_FN m32rbf_fetch_register;
++extern CPUREG_STORE_FN m32rbf_store_register;
++extern void m32rbf_h_cr_set (SIM_CPU *, UINT, USI);
++
+ /* Cover macros for hardware accesses.
+FIXME: Eventually move to cgen.  */
+ #define GET_H_SM() ((CPU (h_psw) & 0x80) != 0)
+ 
+-#ifndef GET_H_CR
+ extern USI  m32rbf_h_cr_get_handler (SIM_CPU *, UINT);
+ extern void m32rbf_h_cr_set_handler (SIM_CPU *, UINT, USI);
++extern USI  m32r2f_h_cr_get_handler (SIM_CPU *, UINT);
++extern void m32r2f_h_cr_set_handler (SIM_CPU *, UINT, USI);
++extern USI  m32rxf_h_cr_get_handler (SIM_CPU *, UINT);
++extern void m32rxf_h_cr_set_handler (SIM_CPU *, UINT, USI);
+ 
++#ifndef GET_H_CR
+ #define GET_H_CR(regno) \
+   XCONCAT2 (WANT_CPU,_h_cr_get_handler) (current_cpu, (regno))
+ #define SET_H_CR(regno, val) \
+   XCONCAT2 (WANT_CPU,_h_cr_set_handler) (current_cpu, (r