forked from bminor/binutils-gdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gdb: protect some 'regcache_read_pc' calls
It possible that a thread whose PC we attempt to read is already dead. In this case, 'regcache_read_pc' errors out. This impacts the "proceed" execution flow, where GDB quits early before having a chance to check if there exists a pending event. To remedy, keep going with a 0 value for the PC if 'regcache_read_pc' fails. Because the value of PC before resuming a thread is mostly used for storing and checking the next time the thread stops, this tolerance is expected to be harmless for a dead thread/process. gdb/ChangeLog: 2020-05-14 Tankut Baris Aktemur <[email protected]> * regcache.c (regcache_read_pc_protected): New function implementation that returns 0 if the PC cannot read via 'regcache_read_pc'. * infrun.c (proceed): Call 'regcache_read_pc_protected' instead of 'regcache_read_pc'. (keep_going_pass_signal): Ditto. gdbsupport/ChangeLog: 2020-05-14 Tankut Baris Aktemur <[email protected]> * common-regcache.h (regcache_read_pc_protected): New function declaration.
- Loading branch information
1 parent
9d95b8e
commit fc75c28
Showing
5 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
2020-05-14 Tankut Baris Aktemur <[email protected]> | ||
|
||
* regcache.c (regcache_read_pc_protected): New function | ||
implementation that returns 0 if the PC cannot read via | ||
'regcache_read_pc'. | ||
* infrun.c (proceed): Call 'regcache_read_pc_protected' | ||
instead of 'regcache_read_pc'. | ||
(keep_going_pass_signal): Ditto. | ||
|
||
2020-05-13 Tom Tromey <[email protected]> | ||
|
||
* ada-lang.c (align_value): Remove. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2020-05-14 Tankut Baris Aktemur <[email protected]> | ||
|
||
* common-regcache.h (regcache_read_pc_protected): New function | ||
declaration. | ||
|
||
2020-04-28 Tankut Baris Aktemur <[email protected]> | ||
|
||
* gdb-sigmask.h: Fix typo (pthead_sigmask -> pthread_sigmask). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters