You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
#include "linux-btrace.h"
-#include "common-utils.h"
-#include "gdb_assert.h"
-#include "regcache.h"
-#include "gdbthread.h"
+#include "common-regcache.h"
#include "gdb_wait.h"
-#include "i386-cpuid.h"
+#include "x86-cpuid.h"
#ifdef HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#if HAVE_LINUX_PERF_EVENT_H && defined(SYS_perf_event_open)
-#include <errno.h>
-#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/mman.h>
gdb_assert (start <= end);
/* The first block ends at the current pc. */
-#ifdef GDBSERVER
- regcache = get_thread_regcache (find_thread_ptid (tinfo->ptid), 1);
-#else
- regcache = get_thread_regcache (tinfo->ptid);
-#endif
+ regcache = get_thread_regcache_for_ptid (tinfo->ptid);
block.end = regcache_read_pc (regcache);
/* The buffer may contain a partial record as its last entry (i.e. when the
{
unsigned int cpuid, model, family;
- if (!i386_cpuid (1, &cpuid, NULL, NULL, NULL))
+ if (!x86_cpuid (1, &cpuid, NULL, NULL, NULL))
return 0;
family = (cpuid >> 8) & 0xf;
{
unsigned int ebx, ecx, edx;
- if (!i386_cpuid (0, NULL, &ebx, &ecx, &edx))
+ if (!x86_cpuid (0, NULL, &ebx, &ecx, &edx))
return 0;
if (ebx == signature_INTEL_ebx && ecx == signature_INTEL_ecx