I am working on graphical GDB frontend and I am curious if there is a way to obtain full executable name from a remote target assuming I don’t have executable loaded in my local debugger.
I’m fine with using either CLI or MI.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get the PID through “info inferiors” and get ps(1) like output through “info os processes”. You’ll then have to search the whole process list to find the matching PID and get its command line:
I checked the GDB source code, the relevant functions for “info os process” are info_osdata_command() and get_osdata(). There’s no builtin way to filter on a PID.