10-27-2011
How to step in one function after the function be executed in gdb?
In gdb, I can call one function with command "call", but how can I step in the function? I don't want to restart the program, but the function had been executed, gdb will execute next statement, and I don't know how to recall the function.
10 More Discussions You Might Find Interesting
1. Programming
Hi,
How I can get system function executed command return value ? I want to know mv command success or not ?
#include <stdio.h>
main()
{
int ret;
ret = system( "mv x.dat y.dat" );
printf( "system ret:\n", ret );
} (3 Replies)
Discussion started by: haiudhaya
3 Replies
2. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
3. Shell Programming and Scripting
hello All,
I need to invoke by perl script some program/command and monitor it for 5
minutes . In case it still running for more then 5 min I need to send a signal which will stop it.
I implemeted this as shown below by using eval & alarm
and I'd like to know if there is a better way to... (1 Reply)
Discussion started by: Alalush
1 Replies
4. Programming
Hi,
we would appreciate if any one answer the below query.
void main()
{
printf(“ I am in main\n”);
execl(“/HOME/source/file2”,” /HOME/source/file2”,1,0);
printf(“after execl\n”);
}
How to step the file2 source code in GDB. (2 Replies)
Discussion started by: RAMESHPRABUDASS
2 Replies
5. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
6. Shell Programming and Scripting
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies
7. Programming
Here is the program I am trying to debug:
#include <stdio.h>
int i = 5;
int main(void)
{
int x = 3;
display(x);
return 0;
}
void display(int x)
{
for ( i=0; i<x; ++i ) {
printf("i is %d.\n", i);
}
}This code is coming from here Peter's gdb Tutorial: Stepping... (2 Replies)
Discussion started by: ijustneeda
2 Replies
8. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
9. Shell Programming and Scripting
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies
10. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT CENTOS
gdbinit
GDBINIT(5) GNU Development Tools GDBINIT(5)
NAME
gdbinit - GDB initialization scripts
SYNOPSIS
/etc/gdbinit
~/.gdbinit
./.gdbinit
DESCRIPTION
These files contain GDB commands to automatically execute during GDB startup. The lines of contents are canned sequences of commands,
described in the GDB manual in node "Sequences" -- shell command "info -f gdb -n Sequences".
Please read more in the GDB manual in node "Startup" -- shell command "info -f gdb -n Startup".
/etc/gdbinit
System-wide initialization file. It is executed unless user specified GDB option "-nx" or "-n". See more in the GDB manual in node
"System-wide configuration" -- shell command "info -f gdb -n 'System-wide configuration'".
~/.gdbinit
User initialization file. It is executed unless user specified GDB options "-nx", "-n" or "-nh".
./.gdbinit
Initialization file for current directory. It may need to be enabled with GDB security command "set auto-load local-gdbinit". See
more in the GDB manual in node "Init File in the Current Directory" -- shell command "info -f gdb -n 'Init File in the Current
Directory'".
OPTIONS
SEE ALSO
gdb(1), "info -f gdb -n Startup"
The full documentation for GDB is maintained as a Texinfo manual. If the "info" and "gdb" programs and GDB's Texinfo documentation are
properly installed at your site, the command
info gdb
should give you access to the complete manual.
Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H. Pesch, July 1991.
COPYRIGHT
Copyright (c) 1988-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs
Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom."
gdb-Red Hat Enterprise Linux 7.6.1-51.el7 2014-06-10 GDBINIT(5)