Compare commits

...

183 Commits

Author SHA1 Message Date
GDB Administrator
b74fd1875e Automatic date update in version.in 2024-05-26 00:00:38 +00:00
GDB Administrator
014262b561 Automatic date update in version.in 2024-05-25 00:00:36 +00:00
GDB Administrator
2ec3a8504a Automatic date update in version.in 2024-05-24 00:01:01 +00:00
GDB Administrator
8da994cadb Automatic date update in version.in 2024-05-23 00:00:32 +00:00
GDB Administrator
36d8ae82ef Automatic date update in version.in 2024-05-22 00:00:24 +00:00
GDB Administrator
7053ecdc99 Automatic date update in version.in 2024-05-21 00:00:48 +00:00
GDB Administrator
eca53580c2 Automatic date update in version.in 2024-05-20 00:00:50 +00:00
GDB Administrator
8c839b795e Automatic date update in version.in 2024-05-19 00:00:37 +00:00
GDB Administrator
abbf8cd338 Automatic date update in version.in 2024-05-18 00:00:37 +00:00
GDB Administrator
6e20d33d43 Automatic date update in version.in 2024-05-17 00:00:56 +00:00
GDB Administrator
8e1e8f3491 Automatic date update in version.in 2024-05-16 00:00:32 +00:00
GDB Administrator
66e33ac050 Automatic date update in version.in 2024-05-15 00:00:37 +00:00
GDB Administrator
cac9fd694d Automatic date update in version.in 2024-05-14 00:00:49 +00:00
GDB Administrator
1da81000d6 Automatic date update in version.in 2024-05-13 00:00:33 +00:00
GDB Administrator
7da0f31e87 Automatic date update in version.in 2024-05-12 00:00:23 +00:00
GDB Administrator
90dc98b905 Automatic date update in version.in 2024-05-11 00:00:58 +00:00
GDB Administrator
8e103e1954 Automatic date update in version.in 2024-05-10 00:00:36 +00:00
GDB Administrator
baf5685335 Automatic date update in version.in 2024-05-09 00:00:31 +00:00
GDB Administrator
e75cc06c6f Automatic date update in version.in 2024-05-08 00:00:40 +00:00
GDB Administrator
a634316364 Automatic date update in version.in 2024-05-07 00:00:36 +00:00
GDB Administrator
60042086fb Automatic date update in version.in 2024-05-06 00:00:29 +00:00
GDB Administrator
61a1d285b1 Automatic date update in version.in 2024-05-05 00:00:27 +00:00
GDB Administrator
2d906248e2 Automatic date update in version.in 2024-05-04 00:00:25 +00:00
GDB Administrator
522ff416d6 Automatic date update in version.in 2024-05-03 00:00:44 +00:00
GDB Administrator
bd42aebf0d Automatic date update in version.in 2024-05-02 00:00:25 +00:00
GDB Administrator
b07421f098 Automatic date update in version.in 2024-05-01 00:00:46 +00:00
GDB Administrator
d0ca530e2b Automatic date update in version.in 2024-04-30 00:00:38 +00:00
GDB Administrator
1bea6ed77f Automatic date update in version.in 2024-04-29 00:00:34 +00:00
GDB Administrator
ec22be9d4b Automatic date update in version.in 2024-04-28 00:00:35 +00:00
GDB Administrator
2183fdce22 Automatic date update in version.in 2024-04-27 00:00:25 +00:00
GDB Administrator
57dbcc4b23 Automatic date update in version.in 2024-04-26 00:00:37 +00:00
GDB Administrator
8726bf92bb Automatic date update in version.in 2024-04-25 00:00:28 +00:00
GDB Administrator
bc248c3095 Automatic date update in version.in 2024-04-24 00:00:54 +00:00
GDB Administrator
f5dc8318ae Automatic date update in version.in 2024-04-23 00:00:42 +00:00
GDB Administrator
a6d483935c Automatic date update in version.in 2024-04-22 00:00:28 +00:00
GDB Administrator
56008582f8 Automatic date update in version.in 2024-04-21 00:00:21 +00:00
GDB Administrator
7439d21c63 Automatic date update in version.in 2024-04-20 00:01:04 +00:00
GDB Administrator
e73656fffb Automatic date update in version.in 2024-04-19 00:00:53 +00:00
GDB Administrator
2190c4e246 Automatic date update in version.in 2024-04-18 00:00:56 +00:00
GDB Administrator
97e22d372f Automatic date update in version.in 2024-04-17 00:00:52 +00:00
GDB Administrator
17a74a505a Automatic date update in version.in 2024-04-16 00:00:38 +00:00
GDB Administrator
c094e69875 Automatic date update in version.in 2024-04-15 00:00:41 +00:00
GDB Administrator
a7b11a1003 Automatic date update in version.in 2024-04-14 00:00:53 +00:00
GDB Administrator
c4f9b811ed Automatic date update in version.in 2024-04-13 00:00:25 +00:00
GDB Administrator
a2e9061ca6 Automatic date update in version.in 2024-04-12 00:00:43 +00:00
GDB Administrator
2b03b46039 Automatic date update in version.in 2024-04-11 00:00:32 +00:00
GDB Administrator
beff33f204 Automatic date update in version.in 2024-04-10 00:00:39 +00:00
GDB Administrator
71017b570f Automatic date update in version.in 2024-04-09 00:00:27 +00:00
GDB Administrator
cf8570b187 Automatic date update in version.in 2024-04-08 00:00:23 +00:00
GDB Administrator
a2441dbdc3 Automatic date update in version.in 2024-04-07 00:00:41 +00:00
GDB Administrator
7cc6a63dfa Automatic date update in version.in 2024-04-06 00:00:38 +00:00
GDB Administrator
b9319774f7 Automatic date update in version.in 2024-04-05 00:00:30 +00:00
GDB Administrator
734b648c48 Automatic date update in version.in 2024-04-04 00:00:29 +00:00
GDB Administrator
dd197cec5b Automatic date update in version.in 2024-04-03 00:00:27 +00:00
GDB Administrator
19c564c8a7 Automatic date update in version.in 2024-04-02 00:00:37 +00:00
GDB Administrator
9ea7215530 Automatic date update in version.in 2024-04-01 00:00:25 +00:00
GDB Administrator
b570239b90 Automatic date update in version.in 2024-03-31 00:00:21 +00:00
GDB Administrator
ac89073b2d Automatic date update in version.in 2024-03-30 00:00:34 +00:00
GDB Administrator
0b8c84ef56 Automatic date update in version.in 2024-03-29 00:01:01 +00:00
GDB Administrator
618e37e2b7 Automatic date update in version.in 2024-03-28 00:02:15 +00:00
GDB Administrator
fcb233f98f Automatic date update in version.in 2024-03-27 00:01:32 +00:00
GDB Administrator
f0ce9a3519 Automatic date update in version.in 2024-03-26 00:02:22 +00:00
GDB Administrator
aabb9c6ba9 Automatic date update in version.in 2024-03-25 00:00:37 +00:00
GDB Administrator
8978a63969 Automatic date update in version.in 2024-03-24 00:00:49 +00:00
GDB Administrator
96e26c99a2 Automatic date update in version.in 2024-03-23 00:01:39 +00:00
GDB Administrator
f39160db5f Automatic date update in version.in 2024-03-22 00:01:19 +00:00
GDB Administrator
6beea67558 Automatic date update in version.in 2024-03-21 00:02:08 +00:00
GDB Administrator
1d310a1a7b Automatic date update in version.in 2024-03-20 00:01:28 +00:00
GDB Administrator
984bd4eecf Automatic date update in version.in 2024-03-19 00:00:44 +00:00
GDB Administrator
b1ca51b734 Automatic date update in version.in 2024-03-18 00:01:14 +00:00
GDB Administrator
4a0b34b562 Automatic date update in version.in 2024-03-17 00:00:41 +00:00
GDB Administrator
564e869815 Automatic date update in version.in 2024-03-16 00:00:45 +00:00
GDB Administrator
0db4c11993 Automatic date update in version.in 2024-03-15 00:01:00 +00:00
GDB Administrator
0a0c1a4c7c Automatic date update in version.in 2024-03-14 00:01:59 +00:00
GDB Administrator
33782d6a2f Automatic date update in version.in 2024-03-13 00:00:59 +00:00
GDB Administrator
a23119ce60 Automatic date update in version.in 2024-03-12 00:01:41 +00:00
GDB Administrator
a81acd20af Automatic date update in version.in 2024-03-11 00:01:27 +00:00
GDB Administrator
a478867e69 Automatic date update in version.in 2024-03-10 00:00:48 +00:00
GDB Administrator
f74b8c0cf5 Automatic date update in version.in 2024-03-09 00:00:52 +00:00
GDB Administrator
8bb435f726 Automatic date update in version.in 2024-03-08 00:00:51 +00:00
GDB Administrator
7f36c511d7 Automatic date update in version.in 2024-03-07 00:01:45 +00:00
GDB Administrator
178eaedb90 Automatic date update in version.in 2024-03-06 00:02:09 +00:00
GDB Administrator
650f37d670 Automatic date update in version.in 2024-03-05 00:01:26 +00:00
GDB Administrator
a5373539b9 Automatic date update in version.in 2024-03-04 00:01:13 +00:00
Joel Brobecker
8a9117d993 Bump GDB's version number to 14.2.90.DATE-git.
This commit changes gdb/version.in to 14.2.90.DATE-git.

This commit also makes the following changes in gdb/testsuite:

	* gdb.base/default.exp: Change $_gdb_minor to 3.
2024-03-03 10:08:46 +04:00
Joel Brobecker
02c10eaecb Set GDB version number to 14.2.
This commit changes gdb/version.in to 14.2.
2024-03-03 09:55:01 +04:00
GDB Administrator
04f4ce39c5 Automatic date update in version.in 2024-03-03 00:01:26 +00:00
GDB Administrator
2e9d13a8dd Automatic date update in version.in 2024-03-02 00:00:43 +00:00
GDB Administrator
c10bd3afc9 Automatic date update in version.in 2024-03-01 00:01:11 +00:00
GDB Administrator
0098e54378 Automatic date update in version.in 2024-02-29 00:01:36 +00:00
GDB Administrator
9b04edac22 Automatic date update in version.in 2024-02-28 00:00:46 +00:00
GDB Administrator
f52761fb8a Automatic date update in version.in 2024-02-27 00:00:50 +00:00
GDB Administrator
17d293e8aa Automatic date update in version.in 2024-02-26 00:01:02 +00:00
GDB Administrator
9f32a6dcbc Automatic date update in version.in 2024-02-25 00:01:34 +00:00
GDB Administrator
d58a3c04c1 Automatic date update in version.in 2024-02-24 00:00:58 +00:00
GDB Administrator
60d62513aa Automatic date update in version.in 2024-02-23 00:01:24 +00:00
GDB Administrator
b1aa46d3e6 Automatic date update in version.in 2024-02-22 00:01:25 +00:00
GDB Administrator
2e35763b64 Automatic date update in version.in 2024-02-21 00:00:44 +00:00
GDB Administrator
6002d5bc4f Automatic date update in version.in 2024-02-20 00:00:40 +00:00
GDB Administrator
ebbb386892 Automatic date update in version.in 2024-02-19 00:00:50 +00:00
GDB Administrator
03a163a411 Automatic date update in version.in 2024-02-18 00:00:27 +00:00
GDB Administrator
87c388d223 Automatic date update in version.in 2024-02-17 00:00:30 +00:00
GDB Administrator
d001d6873b Automatic date update in version.in 2024-02-16 00:00:32 +00:00
GDB Administrator
65064315e4 Automatic date update in version.in 2024-02-15 00:00:52 +00:00
GDB Administrator
d75d43a80e Automatic date update in version.in 2024-02-14 00:00:31 +00:00
GDB Administrator
847f090f42 Automatic date update in version.in 2024-02-13 00:00:56 +00:00
GDB Administrator
fc51918929 Automatic date update in version.in 2024-02-12 00:00:52 +00:00
Hannes Domani
39a61855d4 Fix crash when calling Frame.static_link
If you try to call Frame.static_link for a frame without debug info,
gdb crashes:
```
Temporary breakpoint 1, 0x000000013f821650 in main ()
(gdb) py print(gdb.selected_frame().static_link())

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
```

The problem was a missing check if get_frame_block returns nullptr
inside frame_follow_static_link.

With this, it works:
```
Temporary breakpoint 1, 0x000000013f941650 in main ()
(gdb) py print(gdb.selected_frame().static_link())
None
```

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31366
Approved-By: Tom Tromey <tom@tromey.com>
2024-02-11 17:46:33 +01:00
GDB Administrator
775204fc4b Automatic date update in version.in 2024-02-11 00:00:26 +00:00
GDB Administrator
4ebf4f5607 Automatic date update in version.in 2024-02-10 00:00:57 +00:00
GDB Administrator
6cb1a337b3 Automatic date update in version.in 2024-02-09 00:00:29 +00:00
GDB Administrator
4dde01ea00 Automatic date update in version.in 2024-02-08 00:01:44 +00:00
GDB Administrator
5c5907ece3 Automatic date update in version.in 2024-02-07 00:01:42 +00:00
Tom de Vries
7c709b26ba [gdb/tdep] Fix use-after-free in arm_exidx_fill_cache
On arm-linux the linaro CI occasionally reports:
...
 (gdb) up 10
 #4  0x0001b864 in pthread_join ()
 (gdb) FAIL: gdb.threads/staticthreads.exp: up 10
...
while this is expected:
...
 (gdb) up 10
 #3  0x00010568 in main (argc=1, argv=0xfffeede4) at staticthreads.c:76
 76          pthread_join (thread, NULL);
 (gdb) PASS: gdb.threads/staticthreads.exp: up 10
...

Thiago investigated the problem, and using valgrind found an invalid read in
arm_exidx_fill_cache.

The problem happens as follows:
- an objfile and corresponding per_bfd are allocated
- some memory is allocated in arm_exidx_new_objfile using
  objfile->objfile_obstack, for the "exception table entry cache".
- a symbol reread is triggered, and the objfile, including the
  objfile_obstack, is destroyed
- a new objfile is allocated, using the same per_bfd
- again arm_exidx_new_objfile is called, but since the same per_bfd is used,
  it doesn't allocate any new memory for the "exception table entry cache".
- the "exception table entry cache" is accessed by arm_exidx_fill_cache,
  and we have a use-after-free.

This is a regression since commit a2726d4ff8 ("[ARM] Store exception handling
information per-bfd instead of per-objfile"), which changed the "exception
table entry cache" from per-objfile to per-bfd, but failed to update the
obstack_alloc.

Fix this by using objfile->per_bfd->storage_obstack instead of
objfile->objfile_obstack.

I couldn't reproduce the FAIL myself, but Thiago confirmed that the patch
fixes it.

Tested on arm-linux.

Approved-By: Luis Machado <luis.machado@arm.com>

PR tdep/31254
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31254
2024-02-06 17:59:06 -03:00
GDB Administrator
9163aee2af Automatic date update in version.in 2024-02-06 00:01:45 +00:00
GDB Administrator
fb2afe5818 Automatic date update in version.in 2024-02-05 00:00:44 +00:00
GDB Administrator
76b6b4211e Automatic date update in version.in 2024-02-04 00:01:26 +00:00
GDB Administrator
3f40b80cfa Automatic date update in version.in 2024-02-03 00:00:39 +00:00
GDB Administrator
13e289fc38 Automatic date update in version.in 2024-02-02 00:01:30 +00:00
GDB Administrator
d341144d05 Automatic date update in version.in 2024-02-01 00:01:47 +00:00
GDB Administrator
e35596ea05 Automatic date update in version.in 2024-01-31 00:00:53 +00:00
GDB Administrator
d9ecf4bc08 Automatic date update in version.in 2024-01-30 00:01:27 +00:00
GDB Administrator
c75cd1d04d Automatic date update in version.in 2024-01-29 00:01:25 +00:00
GDB Administrator
d09744378c Automatic date update in version.in 2024-01-28 00:00:32 +00:00
GDB Administrator
04049e81f1 Automatic date update in version.in 2024-01-27 00:01:05 +00:00
GDB Administrator
c5f15eb674 Automatic date update in version.in 2024-01-26 00:01:00 +00:00
GDB Administrator
724ddc0eeb Automatic date update in version.in 2024-01-25 00:02:01 +00:00
GDB Administrator
d739d4fd45 Automatic date update in version.in 2024-01-24 00:01:35 +00:00
Guinevere Larsen
4fe1a40c7c gdb: fix "list ." related crash
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/bugzilla/show_bug.cgi?id=31256
Approved-By: Tom Tromey <tom@tromey.com>
2024-01-23 17:00:40 +01:00
GDB Administrator
9ccb91f0c2 Automatic date update in version.in 2024-01-23 00:01:39 +00:00
GDB Administrator
91e7b0888a Automatic date update in version.in 2024-01-22 00:01:08 +00:00
GDB Administrator
e9b351798f Automatic date update in version.in 2024-01-21 00:01:06 +00:00
GDB Administrator
96fdb048b1 Automatic date update in version.in 2024-01-20 00:00:29 +00:00
GDB Administrator
76b6f2cfa3 Automatic date update in version.in 2024-01-19 00:01:32 +00:00
GDB Administrator
715331f0bb Automatic date update in version.in 2024-01-18 00:01:23 +00:00
GDB Administrator
9843c0189f Automatic date update in version.in 2024-01-17 00:01:47 +00:00
GDB Administrator
021f424ff0 Automatic date update in version.in 2024-01-16 00:01:28 +00:00
GDB Administrator
90637940cd Automatic date update in version.in 2024-01-15 00:00:57 +00:00
GDB Administrator
eb6ac7880a Automatic date update in version.in 2024-01-14 00:00:27 +00:00
GDB Administrator
82d9840bb3 Automatic date update in version.in 2024-01-13 00:00:31 +00:00
GDB Administrator
9076a9fe74 Automatic date update in version.in 2024-01-12 00:01:11 +00:00
GDB Administrator
f4f45bdde3 Automatic date update in version.in 2024-01-11 00:01:51 +00:00
GDB Administrator
ec75ee60a3 Automatic date update in version.in 2024-01-10 00:04:02 +00:00
GDB Administrator
3fb7f9d13d Automatic date update in version.in 2024-01-09 00:04:27 +00:00
GDB Administrator
96e96de206 Automatic date update in version.in 2024-01-08 00:01:34 +00:00
GDB Administrator
ee51e3fda3 Automatic date update in version.in 2024-01-07 00:03:52 +00:00
GDB Administrator
0677303ae2 Automatic date update in version.in 2024-01-06 00:01:59 +00:00
GDB Administrator
42d6bc8346 Automatic date update in version.in 2024-01-05 00:03:21 +00:00
GDB Administrator
25c9c6d65b Automatic date update in version.in 2024-01-04 00:02:58 +00:00
GDB Administrator
dd325ea5aa Automatic date update in version.in 2024-01-03 00:02:30 +00:00
GDB Administrator
3293cc2c26 Automatic date update in version.in 2024-01-02 00:01:34 +00:00
GDB Administrator
e3be5019f2 Automatic date update in version.in 2024-01-01 00:01:08 +00:00
GDB Administrator
b2567d4757 Automatic date update in version.in 2023-12-31 00:00:40 +00:00
GDB Administrator
6d513780c5 Automatic date update in version.in 2023-12-30 00:00:48 +00:00
GDB Administrator
fccb562142 Automatic date update in version.in 2023-12-29 00:01:00 +00:00
GDB Administrator
551400b4d3 Automatic date update in version.in 2023-12-28 00:02:54 +00:00
GDB Administrator
345162ea6f Automatic date update in version.in 2023-12-27 00:01:49 +00:00
GDB Administrator
e74fd29164 Automatic date update in version.in 2023-12-26 00:02:12 +00:00
GDB Administrator
45be6654f0 Automatic date update in version.in 2023-12-25 00:01:32 +00:00
GDB Administrator
bf3e158cc5 Automatic date update in version.in 2023-12-24 00:01:18 +00:00
GDB Administrator
53ec1bcb30 Automatic date update in version.in 2023-12-23 00:00:41 +00:00
GDB Administrator
144a29916f Automatic date update in version.in 2023-12-22 00:00:32 +00:00
GDB Administrator
e0a47b747d Automatic date update in version.in 2023-12-21 00:00:48 +00:00
GDB Administrator
cf87cacec2 Automatic date update in version.in 2023-12-20 00:00:36 +00:00
GDB Administrator
2fff4f5fe3 Automatic date update in version.in 2023-12-19 00:00:41 +00:00
GDB Administrator
6452f70d94 Automatic date update in version.in 2023-12-18 00:00:33 +00:00
GDB Administrator
ee660c7115 Automatic date update in version.in 2023-12-17 00:00:28 +00:00
GDB Administrator
9d6800543f Automatic date update in version.in 2023-12-16 00:00:33 +00:00
GDB Administrator
fe04df33c9 Automatic date update in version.in 2023-12-15 00:00:36 +00:00
GDB Administrator
d55dfb4570 Automatic date update in version.in 2023-12-14 00:00:48 +00:00
GDB Administrator
edee57f5d5 Automatic date update in version.in 2023-12-13 00:00:53 +00:00
GDB Administrator
15ba2a0f7c Automatic date update in version.in 2023-12-12 00:00:28 +00:00
GDB Administrator
2fc1ef8366 Automatic date update in version.in 2023-12-11 00:00:36 +00:00
GDB Administrator
3111c3622d Automatic date update in version.in 2023-12-10 00:00:57 +00:00
GDB Administrator
5f8402b9e2 Automatic date update in version.in 2023-12-09 00:00:44 +00:00
Hannes Domani
bc23ea51f8 Fix printing of global variable stubs if no inferior is running
Since 3c45e9f915 gdb crashes when trying
to print a global variable stub without a running inferior, because of
a missing nullptr-check (the block_scope function took care of that
check before it was converted to a method).

With this check it works again:
```
(gdb) print s
$1 = <incomplete type>
```

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31128
Approved-By: Tom Tromey <tom@tromey.com>
(cherry picked from commit 576745e26c)
2023-12-08 19:09:21 +01:00
GDB Administrator
6af9acfdcd Automatic date update in version.in 2023-12-08 00:00:35 +00:00
GDB Administrator
55276e8753 Automatic date update in version.in 2023-12-07 00:00:53 +00:00
Hannes Domani
43a608adb0 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 = {<text variable, no debug info>} 0x77644120 <UserHandleGrantAccess+36128>
```
gdb 13.2:
```
(gdb) p ExitProcess
$1 = {<text variable, no debug info>} 0x77734120 <ntdll!RtlExitUserProcess>
```

The new behavior started with 9675da2535,
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/bugzilla/show_bug.cgi?id=31112
Approved-By: Tom Tromey <tom@tromey.com>

(cherry picked from commit 2574cd903d)
2023-12-06 21:13:03 +01:00
GDB Administrator
f04aac2ba4 Automatic date update in version.in 2023-12-06 00:00:39 +00:00
GDB Administrator
19a397c30f Automatic date update in version.in 2023-12-05 00:00:54 +00:00
GDB Administrator
30e5331dc1 Automatic date update in version.in 2023-12-04 00:00:28 +00:00
Joel Brobecker
5718a72aa8 Bump GDB's version number to 14.1.90.DATE-git.
This commit changes gdb/version.in to 14.1.90.DATE-git.

This commit also makes the following changes in gdb/testsuite:

	* gdb.base/default.exp: Change $_gdb_minor to 2.
2023-12-03 09:35:52 +04:00
13 changed files with 153 additions and 6 deletions

View File

@@ -16,7 +16,7 @@
In releases, the date is not included in either version strings or
sonames. */
#define BFD_VERSION_DATE 20231203
#define BFD_VERSION_DATE 20240526
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@

View File

@@ -2701,7 +2701,7 @@ arm_exidx_new_objfile (struct objfile *objfile)
if (n_bytes || n_words)
{
gdb_byte *p = entry
= (gdb_byte *) obstack_alloc (&objfile->objfile_obstack,
= (gdb_byte *) obstack_alloc (&objfile->per_bfd->storage_obstack,
n_bytes + n_words * 4 + 1);
while (n_bytes--)

View File

@@ -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. */

View File

@@ -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 ();

View File

@@ -1026,7 +1026,11 @@ cp_lookup_transparent_type (const char *name)
/* If that doesn't work and we're within a namespace, look there
instead. */
scope = get_selected_block (0)->scope ();
const block *block = get_selected_block (0);
if (block == nullptr)
return nullptr;
scope = block->scope ();
if (scope[0] == '\0')
return NULL;

View File

@@ -3127,6 +3127,9 @@ frame_info_ptr
frame_follow_static_link (frame_info_ptr frame)
{
const block *frame_block = get_frame_block (frame, nullptr);
if (frame_block == nullptr)
return {};
frame_block = frame_block->function_block ();
const struct dynamic_prop *static_link = frame_block->static_link ();

View File

@@ -612,7 +612,7 @@ set show_conv_list \
{$_gdb_setting_str = <internal function _gdb_setting_str>} \
{$_gdb_setting = <internal function _gdb_setting>} \
{$_gdb_major = 14} \
{$_gdb_minor = 1} \
{$_gdb_minor = 3} \
{$_shell_exitsignal = void} \
{$_shell_exitcode = 0} \
}

View File

@@ -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 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 <http://www.gnu.org/licenses/>. */
int main ()
{
return 0;
}

View File

@@ -0,0 +1,37 @@
# 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 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 <http://www.gnu.org/licenses/>.
# Test that using the command "list" in a file with no debug information
# will not crash GDB and will give reasonable output.
standard_testfile .c
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
{nodebug}]} {
return -1
}
if {![runto_main]} {
untested "couldn't run to main"
return
}
# Check that GDB doesn't crash when we use list . on an inferior with
# no debug information
gdb_test "list ." "No debug.*" "first 'list .'"
# This should be called twice because the first list invocation since
# printing a frame may take a different codepath, which wouldn't
# trigger the crash.
gdb_test "list ." "No debug.*" "second 'list .'"

View File

@@ -0,0 +1,31 @@
/* This testcase is part of GDB, the GNU debugger.
Copyright 2023 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 <http://www.gnu.org/licenses/>. */
struct S
{
S (int);
virtual ~S ();
int m_i;
};
S s (5);
int main ()
{
return 0;
}

View File

@@ -0,0 +1,32 @@
# Copyright (C) 2023 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 <http://www.gnu.org/licenses/>.
# This file is part of the GDB testsuite.
# It tests printing of a global stub without inferior.
require allow_cplus_tests
standard_testfile .cc
set objfile [standard_output_file ${testfile}.o]
if { [gdb_compile $srcdir/$subdir/$srcfile $objfile object \
{c++ debug}] != "" } {
untested "failed to compile"
return -1
}
clean_restart $objfile
gdb_test "print s" " = <incomplete type>"

View File

@@ -179,3 +179,17 @@ gdb_test "python print(gdb.selected_frame().language())" "c" \
gdb_test "python print(gdb.selected_frame().read_register(list()))" \
".*Invalid type for register.*" \
"test Frame.read_register with list"
# Compile again without debug info.
gdb_exit
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
return -1
}
if {![runto_main]} {
return 0
}
# Test if Frame.static_link works for a frame without debug info.
gdb_test "python print(gdb.selected_frame().static_link())" "None" \
"test Frame.static_link for a frame without debug info"

View File

@@ -1 +1 @@
14.1
14.2.90.DATE-git