Preethi Selvaraju
|
Python script to debug my binary using gdb on QNX OS
|
Preethi Selvaraju
01/31/2023 11:21 PM
post122124
|
Python script to debug my binary using gdb on QNX OS
OS: QNX 11.1 Python: 3.10 Host OS: Windows SDP: qnx710
We are using QualCOMM Snapdragon A1B Sample hardware which has QNX OS and supports gdb. We can run through momentics IDE
.
I'm trying to debug my application which will be running on QNX. When I execute the below python program, it doesn't
execute os.system('file {}'.format(binpath)). It just stopped at gdb prompt.
##Test Program
import os
import subprocess
ip_to_check = ('***.***.*.*')
targetIP_Port = ('***.***.*.*:****')
qnxPath = ('C:/qnx710/host/win64/x86_64/usr/bin')
binpath = ('D:/Project/develop/sample')
#FILE = ('gdbInit.txt')
os.system('cls')
returnStatus = os.system('ping -n 4 {}'.format(ip_to_check))
print('\n')
print('#'*60)
if returnStatus == 1:
print('Please check the target connection, restart and try again...')
print('#'*60)
else:
cwd=os.getcwd()
print("Current Working Directory: {0}".format(cwd))
print('\n')
print('#'*60)
print('Changing Directory to qnx path')
os.chdir(qnxPath)
cwd=os.getcwd()
print("Current Working Directory: {0}".format(cwd))
print('\n')
print('#'*60)
os.system('aarch64-unknown-nto-qnx7.1.0-gdb.exe')
os.system('file {}'.format(binpath))
If I manually execute in command prompt, the symbols are read.
C:/qnx710/host/win64/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gdb.exe D:/Project/develop/sample
Has anyone tried to automate remote debugging the application using gdb on QNX OS. Can you please point out what is
wrong in the above script?
|
|
|