Skip to content

Commit 65aa675

Browse files
yjugloleavr
authored andcommitted
x86-writer: Add cpu_features field
1 parent a1bd597 commit 65aa675

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

gum/arch-x86/gumx86writer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (C) 2009-2022 Ole André Vadla Ravnås <[email protected]>
33
* Copyright (C) 2023 Fabian Freyer <[email protected]>
4+
* Copyright (C) 2024 Yannis Juglaret <[email protected]>
45
*
56
* Licence: wxWindows Library Licence, Version 3.1
67
*/
@@ -169,6 +170,7 @@ gum_x86_writer_reset (GumX86Writer * writer,
169170
writer->target_cpu = GUM_CPU_AMD64;
170171
#endif
171172
writer->target_abi = GUM_NATIVE_ABI;
173+
writer->cpu_features = gum_query_cpu_features ();
172174

173175
writer->base = (guint8 *) code_address;
174176
writer->code = (guint8 *) code_address;

gum/arch-x86/gumx86writer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (C) 2009-2022 Ole André Vadla Ravnås <[email protected]>
33
* Copyright (C) 2023 Fabian Freyer <[email protected]>
4+
* Copyright (C) 2024 Yannis Juglaret <[email protected]>
45
*
56
* Licence: wxWindows Library Licence, Version 3.1
67
*/
@@ -27,6 +28,7 @@ struct _GumX86Writer
2728

2829
GumCpuType target_cpu;
2930
GumAbiType target_abi;
31+
GumCpuFeatures cpu_features;
3032

3133
guint8 * base;
3234
guint8 * code;

0 commit comments

Comments
 (0)