User forums > Using Code::Blocks
[GDB] How to pass a dynamically defined parameter to the debugger?
J.:
How to pass the dynamically determined PID to the debugger to attach to this PID? This is to avoid manual edits of the PID each time when gdb is asked to attach to the host process.
Living on Win10 with CB16.01.
Thanks,
J.
oBFusCATed:
Debug -> Attach is the only possible way to attach to a process and you need to know the pid of the process to succeed.
J.:
Thanks - are you saying that it is not possible to pass the PID dynamically determined by some script to GDB? Even not by using
* some .gdb script called, e.g., from inside GDB (i.e. the gdb shell)
* an env variable together with the GDB switch '--pid=...' from outside gdb?
oBFusCATed:
I don't think, so it is possible at the moment.
But if you describe your use case and it is something generally useful and easy to implement I can do something about it.
ollydbg:
@J.
Please tell use what is the steps you want to get the automatic pid value?
Navigation
[0] Message Index
[#] Next page
Go to full version