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

Add support for executing GDB commands. #1451

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

Pavel-Durov
Copy link
Contributor

@Pavel-Durov Pavel-Durov commented Nov 2, 2024

Added gdb_args to capture all arguments provided after --, allowing multiple GDB-specific arguments.

Usage example:

./bin/gdb_c_test -s -n simple.c -- --command=comms.gdb

@ltratt
Copy link
Contributor

ltratt commented Nov 2, 2024

Should this perhaps be --args to reflect the same thing in gdb itself?

@Pavel-Durov
Copy link
Contributor Author

Should this perhaps be --args to reflect the same thing in gdb itself?

Not sure I understand. Do you mean to use --args in gdb_c_test as a container for any arguments passed to the gdb?

To clarify:
--command: Used to execute a series of GDB commands from a specified file
--args: Intended for passing arguments directly to the program being debugged

@ltratt
Copy link
Contributor

ltratt commented Nov 3, 2024

Ah, I misunderstood --command. I guess what I'm suggesting is gdb_c_test --args "blah blah" where "blah blah" could include --command. Or -- maybe even better? -- pass all args after -- to gdb. So gdb_c_test <gdb_c_test_args> -- <gdb_args>.

@vext01
Copy link
Contributor

vext01 commented Nov 4, 2024

pass all args after -- to gdb

This makes a lot of sense to me. This way we wouldn't need to special case each gdb switch that we wish to support.

What do you think @Pavel-Durov ?

@Pavel-Durov
Copy link
Contributor Author

pass all args after -- to gdb

This makes a lot of sense to me. This way we wouldn't need to special case each gdb switch that we wish to support.

What do you think @Pavel-Durov ?

yeah sounds good :)

@Pavel-Durov
Copy link
Contributor Author

Updated with -- 👉 b5ec224

@ltratt
Copy link
Contributor

ltratt commented Nov 5, 2024

Please squash.

@Pavel-Durov
Copy link
Contributor Author

Pavel-Durov commented Nov 5, 2024

After talking to @vext01, added support for multi arg 👉 bc7608e

@ltratt
Copy link
Contributor

ltratt commented Nov 5, 2024

Good idea! Please squash.

Allows users to pass custom arguments directly to GDB.
@Pavel-Durov
Copy link
Contributor Author

Squashed 👉 9df564e

@Pavel-Durov Pavel-Durov changed the title Add support for executing GDB commands from a file. Add support for executing GDB commands. Nov 9, 2024
@ltratt ltratt added this pull request to the merge queue Nov 10, 2024
Merged via the queue into ykjit:master with commit 82b2e2d Nov 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants