diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2014-02-14 09:25:40 +0100 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2015-02-09 09:49:15 +0100 |
commit | afb778a2a85ab4ac883638e309442f454f158692 (patch) | |
tree | 25392f2c9c4b0f060a122d23adf023e183b3f29e /gdb/common | |
parent | 7d5c24b3ae60b6cfa41ebf9329b2f7832053b0f6 (diff) | |
download | gdb-afb778a2a85ab4ac883638e309442f454f158692.zip gdb-afb778a2a85ab4ac883638e309442f454f158692.tar.gz gdb-afb778a2a85ab4ac883638e309442f454f158692.tar.bz2 |
btrace: identify cpu
Add a struct for identifying a processor and use it in linux-btrace.c when
identifying the processor we're running on.
We will need this feature for the new btrace format.
2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
* common/btrace-common.h (btrace_cpu_vendor, btrace_cpu): New.
* nat/linux-btrace.c: (btrace_this_cpu): New.
(cpu_supports_bts): Call btrace_this_cpu.
(intel_supports_bts): Add cpu parameter.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/btrace-common.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/common/btrace-common.h b/gdb/common/btrace-common.h index bb15109..ba99a06 100644 --- a/gdb/common/btrace-common.h +++ b/gdb/common/btrace-common.h @@ -61,6 +61,34 @@ enum btrace_format BTRACE_FORMAT_BTS }; +/* An enumeration of cpu vendors. */ + +enum btrace_cpu_vendor +{ + /* We do not know this vendor. */ + CV_UNKNOWN, + + /* Intel. */ + CV_INTEL +}; + +/* A cpu identifier. */ + +struct btrace_cpu +{ + /* The processor vendor. */ + enum btrace_cpu_vendor vendor; + + /* The cpu family. */ + unsigned short family; + + /* The cpu model. */ + unsigned char model; + + /* The cpu stepping. */ + unsigned char stepping; +}; + /* A BTS configuration. */ struct btrace_config_bts |