1 | # $Id: pdbutil-to-offsets.sed 106740 2024-10-28 10:26:13Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # For defining member offsets for selected struct so the ARM64 assembler can use them.
|
---|
4 | #
|
---|
5 | # This script uses the 'pretty' command in the llvm-pdbutil.exe utility to do
|
---|
6 | # the dumping from IEMAllN8veRecompiler-obj.pdb. The script ASSUMES a specific
|
---|
7 | # output format and indentation system to work.
|
---|
8 | #
|
---|
9 |
|
---|
10 | #
|
---|
11 | # Copyright (C) 2024 Oracle and/or its affiliates.
|
---|
12 | #
|
---|
13 | # This file is part of VirtualBox base platform packages, as
|
---|
14 | # available from https://www.virtualbox.org.
|
---|
15 | #
|
---|
16 | # This program is free software; you can redistribute it and/or
|
---|
17 | # modify it under the terms of the GNU General Public License
|
---|
18 | # as published by the Free Software Foundation, in version 3 of the
|
---|
19 | # License.
|
---|
20 | #
|
---|
21 | # This program is distributed in the hope that it will be useful, but
|
---|
22 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
24 | # General Public License for more details.
|
---|
25 | #
|
---|
26 | # You should have received a copy of the GNU General Public License
|
---|
27 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
28 | #
|
---|
29 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
30 | #
|
---|
31 |
|
---|
32 | #
|
---|
33 | # The top-level VMCPU members.
|
---|
34 | #
|
---|
35 | /^ struct VMCPU .* {$/,/^ }$/ {
|
---|
36 | s/^ data [+]\(0x[[:xdigit:]][[:xdigit:]]*\) .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/\#define VMCPU_OFF_\2 \1/p
|
---|
37 | s/^ data [+]\(0x[[:xdigit:]][[:xdigit:]]*\) .* \([a-zA-Z_][a-zA-Z0-9_]*\)\[[0-9][0-9]*]$/\#define VMCPU_OFF_\2 \1/p
|
---|
38 | }
|
---|
39 |
|
---|
40 | #
|
---|
41 | # The top-level IEMCPU members.
|
---|
42 | #
|
---|
43 | /^ struct IEMCPU .* {$/,/^ }$/ {
|
---|
44 | s/^ data [+]\(0x[[:xdigit:]][[:xdigit:]]*\) .* \([a-zA-Z_][a-zA-Z0-9_]*\)$/\#define IEMCPU_OFF_\2 \1/p
|
---|
45 | s/^ data [+]\(0x[[:xdigit:]][[:xdigit:]]*\) .* \([a-zA-Z_][a-zA-Z0-9_]*\)\[[0-9][0-9]*]$/\#define IEMCPU_OFF_\2 \1/p
|
---|
46 | }
|
---|
47 |
|
---|