•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 402,860 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,971 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 509 | Replies: 2
![]() |
•
•
Join Date: Oct 2006
Posts: 60
Reputation:
Rep Power: 2
Solved Threads: 0
my program is written in c and compiled and linked with gcc. In normal way; i execute it by giving an argument after writing executable.
and it works.
i need to execute it in gdb debugger. how will i give this abc.dat argument to the gdb debugger? could u plz give a little sample?
thanx
./my_executable abc.dat
and it works.
i need to execute it in gdb debugger. how will i give this abc.dat argument to the gdb debugger? could u plz give a little sample?
thanx
run abc.dat
IIRC
IIRC
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
You can also set the arguments to your program without actually running the program, such as right at the beginning before you forget, with "set args parameters". This is also the easiest way to start your program with no arguments after you ran it with some.
(gdb) help run Start debugged program. You may specify arguments to give it. Args may include "*", or "[...]"; they are expanded using "sh". Input and output redirection with ">", "<", or ">>" are also allowed. With no arguments, uses arguments last specified (with "run" or "set args"). To cancel previous arguments and run with no arguments, use "set args" without arguments. (gdb) help set args Set argument list to give program being debugged when it is started. Follow this command with any number of args, to be passed to the program. (gdb)
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
![]() |
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- debugging shared object (C)
- sending address of multidimensional char array to a function (C)
- values of pointer change after sending as a parameter (C)
- function returns address out of bounds (C)
- 'Segmentation Fault' (C++)
- Heap block at 003D2CA0 modified at 003D2CB3 past requested size of b (C++)
- Code::Blocks deguger question (C)
- Document.insertString(); not working (Java)
Other Threads in the C Forum
- Previous Thread: __XXXXXX Function Types
- Next Thread: Sign/magnitude mantissa



Linear Mode