[gdb/testsuite] Move code from gdb_init to default_gdb_init
If a baseboard file wants to override a proc foo, but also use the original
proc, it'll have to do something like:
...
rename foo save_foo
proc foo { } {
...
set res [save_foo]
...
return res
}
...
This adds a new proc named save_foo, which introduces the risk of clashing with
an existing proc.
There's a pattern in the gdb testsuite procs, that facilitates this override:
...
proc default_foo { } {
...
}
proc foo { } {
return [default_foo]
}
...
such that in a baseboard file we don't need the rename:
...
proc foo { } {
...
set res [default_foo]
...
return res
}
...
The exception to the pattern though is gdb_init, which has a default_gdb_init
counterpart, but contains much more code than just the call to
default_gdb_init.
Fix this by moving all but the call to default_gdb_init to default_gdb_init.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-06-18 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_init): Move all but call to default_gdb_init to ...
(default_gdb_init): ... here.