I am writing a batch file for the gdb debugger. I run the gdb process but I want to know how to pass the parameters to the gdb process from the batch file. Here is my sample batch file:
@echo off
cd /d "c:\MinGW\bin\"
set PATH=c:\MinGW\bin\
echo %PATH%
gcc -g start.c -o start.exe
gdb start.exe
gdb > set logging file output.txt
gdb > b 1
pause
As shown above when I start gdb for start.exe, I need to pass the set logging file and breakpoint parameters to it via the batch file. But above code is not working. Please help me on this.