Add default gdb version so it can be shared.
This commit is contained in:
parent
c79f61db34
commit
5019a2755a
1 changed files with 16 additions and 0 deletions
|
@ -23,6 +23,22 @@
|
|||
# need to be modified for any target, it can be done with a variable
|
||||
# or by passing arguments.
|
||||
|
||||
#
|
||||
# gdb_version -- extract and print the version number of gcc
|
||||
#
|
||||
proc default_gdb_version {} {
|
||||
global GDB
|
||||
global GDBFLAGS
|
||||
if {[which $GDB] != 0} then {
|
||||
set tmp [exec echo "q" | $GDB]
|
||||
set version "[lindex $tmp [lsearch $tmp "\[0-9\]*"]]"
|
||||
set version "[string range $version 0 [expr [string length $version]-2]]"
|
||||
clone_output "[which $GDB] version $version $GDBFLAGS\n"
|
||||
} else {
|
||||
warning "$GDB does not exist"
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# gdb_unload -- unload a file if one is loaded
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue