logo       

gdb/2211: Cannot Share GDB variables with 'set env' or 'shell' commands: msg#00005

Subject: gdb/2211: Cannot Share GDB variables with 'set env' or 'shell' commands
>Number:         2211
>Category:       gdb
>Synopsis:       Cannot Share GDB variables with 'set env' or 'shell' commands
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 18:08:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     M. Bytnar
>Release:        gdb-6.4
>Organization:
>Environment:
Fedora Core
>Description:
There is no means to evaluate a GDB expression in the 'set env' or 'shell' 
commands.
Please correct me if I am wrong, since the documentation and use of GDB has not 
revealed a way to do so.

Benefits of implementing this feature:
* A means to display a date variable in human readable by using the shell's 
"date" command.
* A means to customize program arguments for automation from within gdb.

Granted, setting variables is a first step. A second future step/suggestion 
might allow one to import shell variables into GDB variables. ie. 

  set env CURDATE=`date +%s`
  p shell_eval($CURDATE)

where "shell_eval(expression)" evaluates the given expression using the shell 
or 'set env' environment variables.
>How-To-Repeat:
Ideally, I would like to display the date (stored as seconds since the Unix 
Epoch) in my currently executing program (or from a core dump) to a human 
readable form using the 'date -d' shell command:

shell date -d '1970-01-01 gdb_eval(MyProgram::CurDate.secondsSinceEpoch) sec'

Where 'gdb_eval(expression)' is a means to evaluate an expression within the 
gdb 'shell' or 'set env' commands.

Currently, attempts to store a GDB variable using 'set env' or 'shell' both 
fail, because GDB forwards the string without performing evaluation.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe