forked from crash-utility/crash
-
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.
synchronise cpu context changes between crash/gdb
Currently, both crash context and gdb's current thread context were pretty independent, and could be different, for example, crash commands might be working on thread 6 (CPU 5), but GDB passthroughs will be working on thread 2 (CPU 1). This was not a problem earlier since interaction of crash and gdb was not depending on current context for most part. But with more interactions, this patch should solve any issues due to mismatch in context in crash/gdb. Synchronise 'thread' command in gdb with 'set -c' command in crash. 1. crash -> gdb synchronisation: Everytime crash's context changes, a helper is called to switch to the thread on that CPU in gdb. The function has been implemented in crash_target.c, since gdb functions are accessible inside 'crash_target.c', and the thread ID to CPU ID mapping is also done by the crash_target, during initially registering the threads with gdb. With this implementation, GDB's default thread initially also changes to the crashing thread, so a switch to crashing thread manually isn't required anymore 2. gdb -> crash synchronisation: gdb has been patched to call 'set_cpu' whenever user switches to any thread. Cc: Sourabh Jain <[email protected]> Cc: Hari Bathini <[email protected]> Cc: Mahesh J Salgaonkar <[email protected]> Cc: Naveen N. Rao <[email protected]> Cc: Lianbo Jiang <[email protected]> Cc: HAGIO KAZUHITO(萩尾 一仁) <[email protected]> Cc: Tao Liu <[email protected]> Signed-off-by: Aditya Gupta <[email protected]>
- Loading branch information
1 parent
fecf1c0
commit e058560
Showing
5 changed files
with
67 additions
and
2 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
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
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