]> git.proxmox.com Git - mirror_edk2.git/blame - InOsEmuPkg/Unix/GdbRun
InOsEmuPkg/Unix: Auto-run emulator in gdb
[mirror_edk2.git] / InOsEmuPkg / Unix / GdbRun
CommitLineData
fe7e504f 1## @file
2# GDB startup script
3#
4# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
5#
6# This program and the accompanying materials
7# are licensed and made available under the terms and conditions of the BSD License
8# which accompanies this distribution. The full text of the license may be found at
9# http://opensource.org/licenses/bsd-license.php
10#
11# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13#
14##
15
16#
17# Gdb will set $_exitcode when the program exits. Pre-init it to an unlikely
18# return value.
19#
20set $_exitcode = 42
21
22#
23# Gdb will call hook-stop on each break. Check to see if $_exitcode was
24# changed from the value we pre-initialized it to. If so, the program
25# had exited, so gdb should now quit.
26#
27define hook-stop
28 if $_exitcode != 42
29 quit
30 end
31end
32
33#
34# Start the program running
35#
36run
37