mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 10:03:47 +08:00
2f46cda83b
In an effort to support AVX instructions when recording, we need to allow replaying threads to access pseudo registers. Currently, if we try to do that gdb will fail in a call to validate_registers_access, because the thread is executing so GDB thinks it is unsafe to read pseudo registers. When replaying, the thread is really executing for all intents and purposes, but the execution is just having GDB change values on registers, so it will always be safe to read and write pseudo registers. This commit changes functions that check for register access to allow access when we are replaying. The check to whether we are replaying must not happen when writing a core file, as record_full_list could be nullptr, so we only check it if the thread is executing. As of this commit, I don't know of a way to trigger this commit without AVX support on record, so a test isn't provided. However, as soon as record-full supports saving ymm registers, the AVX tests will test this as well. Approved-By: Tom Tromey <tom@tromey.com>
40 lines
1.4 KiB
C
40 lines
1.4 KiB
C
/* Process record and replay target for GDB, the GNU debugger.
|
|
|
|
Copyright (C) 2013-2024 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef RECORD_FULL_H
|
|
#define RECORD_FULL_H
|
|
|
|
#include "gdbsupport/scoped_restore.h"
|
|
|
|
extern bool record_full_memory_query;
|
|
|
|
extern int record_full_arch_list_add_reg (struct regcache *regcache, int num);
|
|
extern int record_full_arch_list_add_mem (CORE_ADDR addr, int len);
|
|
extern int record_full_arch_list_add_end (void);
|
|
|
|
/* Returns true if the process record target is open. */
|
|
extern int record_full_is_used (void);
|
|
|
|
/* Whether the inferior is being replayed, or is executing normally. */
|
|
extern bool record_full_is_replaying ();
|
|
|
|
extern scoped_restore_tmpl<int> record_full_gdb_operation_disable_set ();
|
|
|
|
#endif /* RECORD_FULL_H */
|