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

Cannot use --args for gdb #68

Open
vimkim opened this issue Jul 18, 2024 · 1 comment
Open

Cannot use --args for gdb #68

vimkim opened this issue Jul 18, 2024 · 1 comment
Labels
backend bug Something isn't working

Comments

@vimkim
Copy link

vimkim commented Jul 18, 2024

--args is a very useful and commonly used command for gdb.

Instead of setting set args A B C everytime when running a program, you can provide arguments to the program using

gdb --args myExecutable -A -B -C D E F

You must make sure that no gdb related arguments come after --args since they will be interpreted as those for the executable, not gdb.

However, the following codes in run.py seems it appends python command after the gdb_args.

gdb_executable +
            " " + gdb_args +
            " -ex \\\"python import sys, os; sys.path.insert(0, '"+path+"'); import config, json, base64; config.init(); " +
            "config.setJSON(base64.b64decode('"+base64.b64encode(json.dumps(arg_config).encode()).decode()+"').decode()); import gdbfrontend\\\"; read;"
            "\" "

It makes the following code buggy

gdbfrontend -G "--args myExecutable -A -B -C D E F

resulting in a silent error even in a verbose mode.

I would appreciate if you fix this issue so that I can invoke my program with --args.

@rohanrhu
Copy link
Owner

Hello, I'll look and fix it soon. Thank you.

@rohanrhu rohanrhu added bug Something isn't working backend labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants