Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix thread and process widget API usage to match dpT and dp behavior. #3411

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

karliss
Copy link
Member

@karliss karliss commented Feb 2, 2025

Your checklist for this pull request

Detailed description

Use same API as dpT and dp, for listing threads and processes. I am guessing that either there was a mistake during rizin command->C API migration or the behavior of rizin functions slightly changed.

Improve the content of thread widget -> add PC and TLS columns, with the usual address context menu.

Test plan (required)

Test all process list:

  • open any executable
  • Debug/Attach
  • should see list of all currently running processes

Test threads:

  • open executable which will spawn multiple threads
  • start debugging
  • continue until threads are created
  • pause
  • inspect thread widget -> should display the threads, compare against dpT and external task manager
  • switch between threads by double clicking, make sure that position in disassembly view matches displayed PC of selected thread
  • right click on one of PC cells -> make sure correct address is used
  • right click on one of TLS cells -> make sure correct address is used
  • open process widget -> the threads shouldn't be displayed as processes

Test process widget

  • open /usr/bin/stress
  • start debugging with --cpu 2 arguments
  • continue until child processes are spawned pause if necessary, in my case cutter automatically paused when new process was created
  • inspect process widget -> should display 3 processes

image

Closing issues

Closes #3409

Related #1859

@karliss karliss added the Debug Issues related to the Debug component of Cutter label Feb 2, 2025
@karliss karliss force-pushed the threads branch 2 times, most recently from 95a50b1 to 2847d7e Compare February 2, 2025 15:10
@karliss karliss marked this pull request as ready for review February 2, 2025 15:45
@karliss karliss merged commit d8bd8d4 into rizinorg:dev Feb 3, 2025
14 checks passed
@karliss karliss deleted the threads branch February 3, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Debug Issues related to the Debug component of Cutter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thread widget shows only one thread
2 participants