4 # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
11 # Gdb will set $_exitcode when the program exits. Pre-init it to an unlikely
17 # Gdb will call hook-stop on each break. Check to see if $_exitcode was
18 # changed from the value we pre-initialized it to. If so, the program
19 # had exited, so gdb should now quit.
30 # We keep track of the number of symbol files we have loaded via gdb
31 # scripts in the $SymbolFilesAdded variable
33 set $SymbolFileChangesCount = 0
36 # This macro adds a symbols file for gdb
38 # @param $arg0 - Symbol file changes number
39 # @param $arg1 - Symbol file name
40 # @param $arg2 - Image address
42 define AddFirmwareSymbolFile
43 if $SymbolFileChangesCount < $arg0
44 add-symbol-file
$arg1 $arg2
45 set $SymbolFileChangesCount = $arg0
50 # This macro removes a symbols file for gdb
52 # @param $arg0 - Symbol file changes number
53 # @param $arg1 - Symbol file name
55 define RemoveFirmwareSymbolFile
56 if $SymbolFileChangesCount < $arg0
58 # Currently there is not a method to remove a single symbol file
60 set $SymbolFileChangesCount = $arg0
65 # in Xcode the program is already running. Issuing a run command
66 # will cause a fatal debugger error. The break point script that
67 # is used to source this script sets gInCode to 1.
70 # Start the program running