X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fnto-tdep.h;h=f176b70df27dca8998ccec31f6337b99321546a0;hb=7124770976d3f051532faf864013b76ab36249bf;hp=c2a0eaffc58018b1cb22cdea7c4f9d67ad2d70c2;hpb=0df8b4180acb4890d058c92753dafcd4ff0a87d1;p=binutils-gdb.git
diff --git a/gdb/nto-tdep.h b/gdb/nto-tdep.h
index c2a0eaffc58..f176b70df27 100644
--- a/gdb/nto-tdep.h
+++ b/gdb/nto-tdep.h
@@ -1,7 +1,6 @@
/* nto-tdep.h - QNX Neutrino target header.
- Copyright (C) 2003, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2003-2022 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
@@ -20,8 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
-#ifndef _NTO_TDEP_H
-#define _NTO_TDEP_H
+#ifndef NTO_TDEP_H
+#define NTO_TDEP_H
#include "solist.h"
#include "osabi.h"
@@ -32,9 +31,6 @@
struct nto_target_ops
{
-/* For 'maintenance debug nto-debug' command. */
- int internal_debugging;
-
/* The CPUINFO flags from the remote. Currently used by
i386 for fxsave but future proofing other hosts.
This is initialized in procfs_attach or nto_start_remote
@@ -80,8 +76,6 @@ struct nto_target_ops
extern struct nto_target_ops current_nto_target;
-#define nto_internal_debugging (current_nto_target.internal_debugging)
-
#define nto_cpuinfo_flags (current_nto_target.cpuinfo_flags)
#define nto_cpuinfo_valid (current_nto_target.cpuinfo_valid)
@@ -140,12 +134,28 @@ typedef struct _debug_regs
qnx_reg64 padding[1024];
} nto_regset_t;
-struct private_thread_info
+struct nto_thread_info : public private_thread_info
+{
+ short tid = 0;
+ unsigned char state = 0;
+ unsigned char flags = 0;
+ std::string name;
+};
+
+static inline nto_thread_info *
+get_nto_thread_info (thread_info *thread)
{
- short tid;
- unsigned char state;
- unsigned char flags;
- char name[1];
+ return static_cast (thread->priv.get ());
+}
+
+/* Per-inferior data, common for both procfs and remote. */
+struct nto_inferior_data
+{
+ /* Last stopped flags result from wait function */
+ unsigned int stopped_flags = 0;
+
+ /* Last known stopped PC */
+ CORE_ADDR stopped_pc = 0;
};
/* Generic functions in nto-tdep.c. */
@@ -160,7 +170,8 @@ void nto_relocate_section_addresses (struct so_list *,
int nto_map_arch_to_cputype (const char *);
-int nto_find_and_open_solib (char *, unsigned, char **);
+int nto_find_and_open_solib (const char *, unsigned,
+ gdb::unique_xmalloc_ptr *);
enum gdb_osabi nto_elf_osabi_sniffer (bfd *abfd);
@@ -172,6 +183,12 @@ void nto_dummy_supply_regset (struct regcache *regcache, char *regs);
int nto_in_dynsym_resolve_code (CORE_ADDR pc);
-char *nto_extra_thread_info (struct thread_info *);
+const char *nto_extra_thread_info (struct target_ops *self, struct thread_info *);
+
+LONGEST nto_read_auxv_from_initial_stack (CORE_ADDR inital_stack,
+ gdb_byte *readbuf,
+ LONGEST len, size_t sizeof_auxv_t);
+
+struct nto_inferior_data *nto_inferior_data (struct inferior *inf);
-#endif
+#endif /* NTO_TDEP_H */