Commit 2a62be5
committed
pttc: Add support for nasm assembler
Replace yasm with nasm as the default assembler for pttc. Yasm is no
longer actively maintained and has known security vulnerabilities, while
nasm is actively developed and provides equivalent functionality.
Key changes:
1. Update assembler invocation from 'yasm' to 'nasm'
2. Remove '-L nasm' option (nasm doesn't need this flag)
3. Adjust argv array indices after removing the flag
4. Support both yasm and nasm org directive formats:
- yasm: [org 0x100000]
- nasm: org 0x100000
5. Handle nasm's listing format which lacks %line directives by
implementing 1:1 line mapping fallback for source correlation
The changes maintain backward compatibility with existing .ptt test files
while enabling nasm as the preferred assembler.
Tested with:
- test/src/loop-tnt.ptt
- test/src/dump-all-packets.ptt
Both tests generate valid PT traces that can be decoded with ptdump.
Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>1 parent 63e1c17 commit 2a62be5
2 files changed
Lines changed: 56 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
197 | 207 | | |
198 | 208 | | |
199 | | - | |
200 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
201 | 222 | | |
202 | 223 | | |
203 | 224 | | |
| |||
720 | 741 | | |
721 | 742 | | |
722 | 743 | | |
723 | | - | |
| 744 | + | |
724 | 745 | | |
725 | 746 | | |
726 | 747 | | |
727 | | - | |
728 | 748 | | |
729 | 749 | | |
730 | 750 | | |
731 | 751 | | |
732 | 752 | | |
733 | 753 | | |
734 | | - | |
| 754 | + | |
735 | 755 | | |
736 | 756 | | |
737 | 757 | | |
| |||
825 | 845 | | |
826 | 846 | | |
827 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
828 | 851 | | |
829 | | - | |
830 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
831 | 874 | | |
832 | 875 | | |
833 | 876 | | |
| |||
0 commit comments