gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gdb] Command Line Parameters under gdb


From: Clark L. Coleman
Subject: Re: [Gdb] Command Line Parameters under gdb
Date: Tue, 17 Feb 2004 20:15:28 -0500 (EST)

> 
> For the first time, I am attempting to employ gdb, which is version 6.0 
> on my Linux system.
> 
> The program that I want to debug is invoked from the command line like:
>       ./cppParser test
> 
> When running it under gdb, I type 'gdb cppParser test'.
> 
> First, I get this error(status?) message at startup: "test" is not a 
> core dump: File format not recognized
> 
> When I subsequently run my program, its built-in error message that a 
> required command line parameter is missing goes off.
> 
> How does one provide command line parameters to a program being run by gdb?

Type:

gdb cppParser

Then, inside gdb, type:

run test

This runs your executable and passes "test" to it as a command-line
argument.

Clark Coleman
University of Virginia

P.S. On linux, type "info gdb" for online help.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]