theres 2 ways:
the older way:
(gdb) shell echo set \$x=\"$(uname -m)\" >/tmp/foo.gdb
(gdb) source /tmp/foo.gdb
newer with python:
(gdb) python gdb.execute("set $y=\"" + os.uname()[4] + "\"")
More Related Contents:
- Useless use of cat?
- How to use SSH to run a local shell script on a remote machine?
- Using cURL to upload POST data with files
- Interactive shell using Docker Compose
- Insert line after match using sed
- What’s an easy way to read random line from a file?
- Returning value from called function in a shell script
- Alternative to `sed -i` on Solaris
- Is there an Eclipse plugin to run system shell in the Console? [closed]
- commands not found on zsh [closed]
- Rename multiple files by replacing a particular pattern in the filenames using a shell script [duplicate]
- How do you catch error codes in a shell pipe?
- Concise and portable “join” on the Unix command-line
- How to add timestamp to STDERR redirection
- How can I redirect the output of the “time” command?
- is it possible to use variables in remote ssh command?
- CMake’s execute_process and arbitrary shell scripts
- Permission denied at hdfs
- How to do multiline shell script in Ansible
- How to execute a shell script on a remote server using Ansible?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- How to run a command in the background and get no output?
- How to grep a text file which contains some binary data?
- How can I pass variables from awk to a shell command?
- How to input automatically when running a shell over SSH?
- Which terminal command to get just IP address and nothing else?
- How to add text at the end of each line in unix
- How to print 5 consecutive lines after a pattern in file using awk [duplicate]
- how do I use the grep –include option for multiple file types?
- Batch convert latin-1 files to utf-8 using iconv