473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How do i pass argument to gdb?

Hi

I want to pass argument to gdb but i don't know to do that.

Say,

my executable taking 3 argument.

<myexe> <arg1> <arg2> <arg3>

when i try to debug myexe,
like that

gdb myexe

but i dont konw how to pass 3 arguments .


Please, some suggestion.
Thanks in advace.
Ashok
Aug 28 '08 #1
2 53605
Ganon11
3,652 Expert 2GB
When you actually run your program in gdb (by typing run), add your arguments there.

For instance, if I wanted to run myProg.exe with the command line arguments 1, 2, and eleven, I would type:

Expand|Select|Wrap|Line Numbers
  1. gdb myProg.exe
  2. (setup stuff here, maybe set some breakpoints, then...)
  3. run 1 2 eleven
Aug 28 '08 #2
mac11
256 100+
you can also use the --args flag on the command line like this:

> gdb --args myprogram arg1 arg2 arg3
Aug 28 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Todd | last post by:
Is it possible to pass an argument by reference through an event in C++ managed code? For example, can I do the following? public __gc class MyClass : public Control { public: __event...
4
by: quiteblack | last post by:
howdy~ i wrote a .py file and it works fine, my goal is to pass argument to that py file when it get executed, and accept that argument within py file, eg. i prefer a command like below: ...
2
by: Mountain Bikn' Guy | last post by:
It is known that one cannot pass arguments as ref or out in a marshal-by-reference class. My problem is that I have a C DLL (and C# wrapper) that I need to isolate in an AppDomain and then I need...
2
by: fusillo | last post by:
My code pass a value of a variable to the event handler's argument by means of eval statement here's: //statements setting evt for (var i=0; i<evt.periodi.length; i++){ //evt.periodi is an...
1
by: TarDuk a memory beyond the life | last post by:
I am developing a shopping cart application for jwellary designing \ now i am displaying all the product in the table dynamically. and also show on image button as a add to cart after every item....
7
by: bowlderster | last post by:
Hello,all. I want to get the array size in a function, and the array is an argument of the function. I try the following code. /*************************************** */ #include<stdio.h>...
10
by: Robert Dailey | last post by:
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the...
19
by: Spiros Bousbouras | last post by:
Every time I've seen an example of a variable argument list function its functionality was to print formatted output. Does anyone have examples where the function is not some variation of printf ?
5
dlite922
by: dlite922 | last post by:
All i want to do in C++ is pass a few arguments, concatenate them into variable and call system() I've gotten this far: #include <stdio.h> #include <stdlib.h> #include <string>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.