VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructsAsm-lst.sed@ 3840

Last change on this file since 3840 was 1527, checked in by vboxsync, 18 years ago

[bits 64]

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 742 bytes
Line 
1#
2# Strip stuff lines and spaces we don't care about.
3#
4/ %line /d
5/\[section /d
6/\[bits /d
7/\[absolute /d
8/ times /d
9s/ *[0-9]* //
10/^ *$/d
11s/ *$//g
12s/^ *//g
13/^\.text$/d
14/^\.data$/d
15/^\.bss$/d
16
17#
18# Figure which type of line this is and process it accordingly.
19#
20/^[A-Za-z][A-Za-z0-9_]*:/b struct
21/<gap>/b member
22b error
23
24
25#
26# Struct start / end.
27#
28:struct
29s/:$//
30h
31s/^/global /
32s/$/ ; struct/
33b end
34
35
36#
37# Struct member
38# Note: the 't' command doesn't seem to be working right with 's'.
39#
40:member
41s/[0-9a-fA-Z]* *//
42s/<gap> *//
43/^\.[a-zA-Z0-9_.]*[:]* .*$/!t error
44s/\(\.[a-zA-Z0-9_]*\)[:]* .*$/\1 /
45G
46s/^\([^ ]*\) \(.*\)$/global \2\1 ; member/
47s/\n//m
48
49b end
50
51:error
52s/^/\nSed script logic error!\nBuffer: /
53s/$/\nHold: /
54G
55q 1
56b end
57
58
59:end
60
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette