I don't know of a way to do it directly, but you can issue shell commands using the 'shell' command. e.g.
Code:
(undodb-gdb) shell date
Fri May 10 18:03:47 BST 2013
(undodb-gdb)
will tell you the time from the gdb prompt. To have this happen automagically each time a breakpoint is hit or whatever, you can use a stop hook:
Code:
(undodb-gdb) define hook-stop
Type commands for definition of "hook-stop".
End with a line saying just "end".
>shell date
>end
(undodb-gdb) next
Fri May 10 18:03:54 BST 2013
25 c++;
(undodb-gdb) next
Fri May 10 18:03:55 BST 2013
26 x = add (2);
(undodb-gdb) next
After +2 a=3, b=4, c=5
Fri May 10 18:03:56 BST 2013
27 a++;
(undodb-gdb)
Note that I'm using UndoDB above, but it's the same interface as gdb (actually, it uses gdb as a frontend). You can see more about UndoDB here at undo-software.com
This User Gave Thanks to gregthelaw For This Post:
I was wondering if anyone had a script that would display the last time a user logged into a particular machine. I know about the "last" command, but it gives too much info.... I just wanted to know the last time a user used his/her id. ANy help would be greatly appreciated.
Ryan (3 Replies)
Hi,
In unix the command "date +%s" displays the date-time in seconds since â00:00:00 1970-01-01 UTCâ (a GNU extension)
when executed on unix:
-sh-2.05b$ date +%s
1152092690
I tried with all the format control output but unable to display the date-time in seconds i,e as in unix format. Can... (6 Replies)
Hi All,
I am unable to display the code in gdb. When i put list command i dont get any line. I mean i am unable to display the source line in gdb.
Can any body help me.
Thanks & Regards
Gauri (4 Replies)
hi all,
am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times.
code sniplet i am using is :
grep -i 'text to grep' Out.log |
while read LINE;
do
... (11 Replies)
Hi,
On using GDB debugger on different executables, the address displayed for the symbols seem incorrect, as it shows me the same address in each prorgram, run simultaneoulsy.
eg:
Program: linkmain1.c
Breakpoint 1, main () at linkmain1.c:14
14 printf("In linkmain1.c\n");
(gdb)... (0 Replies)
I found via Google a way to show the date and time stamp once I log in. However, whenever I cd to another directory it doesn't display the correct path.
Here are the relevant parts from my .kshrc :
unset _h _m _s
eval $(date "+_h=%H ;_m=%M ;_s=%S")
((SECONDS =... (3 Replies)
Well guys,
I know the right syntax for displaying the current date is $(date). However, I am planning to send emails to some customers which displays their subscription date, and then the expiry. The expiry being 30 days from the current date.
What would the right syntax be? (6 Replies)
Hi , I have BASH system & i am trying to display the files created on a particular date and time, and after displaying those files I also want to delete all those files.Can anyone of you help me out for this.............
Thanx
Original post contents restored...
Please do not erase the question... (3 Replies)
I have a cluster of two Solaris server (veritas cluster). one working and the other is standby
I am going to change the date on them , and am looking for a secure solution as it is giving an important service.
my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies
LEARN ABOUT CENTOS
gdb-add-index
GDB-ADD-INDEX(1) GNU Development Tools GDB-ADD-INDEX(1)NAME
gdb-add-index - Add index files to speed up GDB
SYNOPSIS
gdb-add-index filename
DESCRIPTION
When GDB finds a symbol file, it scans the symbols in the file in order to construct an internal symbol table. This lets most GDB
operations work quickly--at the cost of a delay early on. For large programs, this delay can be quite lengthy, so GDB provides a way to
build an index, which speeds up startup.
To determine whether a file contains such an index, use the command readelf -S filename: the index is stored in a section named
".gdb_index". Note that the index is never generated for files that do not contain DWARF debug information (sections named ".debug_*").
See more in the GDB manual in node "Index Files" -- shell command "info -f gdb -n 'Index Files'".
OPTIONS SEE ALSO
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 GDB-ADD-INDEX(1)