2002-07-18 Michal Ludvig <mludvig@suse.cz>
+ * linux-low.c (regsets_store_inferior_registers): Add free()
+ at the end of a loop to prevent memory leak.
+ * linux-x86-64-low.c (x86_64_regmap): Add CS, SS registers.
+ (X86_64_NUM_GREGS): Count it from the size of x86_64_regmap.
* config/sparc/tm-sp64linux.h: Make the rest of #endif
line a comment.
* Makefile.in (x86-64-linux-nat.o): Remove dependency on i387-tdep.h
#include <sys/procfs.h>
#include <sys/ptrace.h>
-#define X86_64_NUM_GREGS 22
-
-static int x86_64_regmap[X86_64_NUM_GREGS] = {
+static int x86_64_regmap[] = {
RAX * 8, RBX * 8, RCX * 8, RDX * 8,
RSI * 8, RDI * 8, RBP * 8, RSP * 8,
R8 * 8, R9 * 8, R10 * 8, R11 * 8,
R12 * 8, R13 * 8, R14 * 8, R15 * 8,
- RIP * 8, EFLAGS * 8,
+ RIP * 8, EFLAGS * 8, CS * 8, SS * 8,
DS * 8, ES * 8, FS * 8, GS * 8
};
+#define X86_64_NUM_GREGS (sizeof(x86_64_regmap)/sizeof(int))
+
static void
x86_64_fill_gregset (void *buf)
{