aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAleksandar Ristovski <aristovski@qnx.com>2015-10-16 11:29:17 -0400
committerAleksandar Ristovski <aristovski@qnx.com>2015-10-16 11:49:03 -0400
commit774ee6d252eba19d3e23c936d14bfc1f7fa70651 (patch)
treed12378eb3decd7552b2af882a40e5bed21189aa5 /gdb
parent833dcd29758287ac7799d9c022c0994f7c16608e (diff)
downloadgdb-774ee6d252eba19d3e23c936d14bfc1f7fa70651.zip
gdb-774ee6d252eba19d3e23c936d14bfc1f7fa70651.tar.gz
gdb-774ee6d252eba19d3e23c936d14bfc1f7fa70651.tar.bz2
[nto] Fix nto build.
gdb/gdbserver/ChangeLog: * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix variable name. gdb/ChangeLog: * nto-procfs.c (common/filestuff.h): Include. (procfs_can_use_hw_breakpoint): Fix enum name. (procfs_open_1): Fix compiler warning. (procfs_pidlist): Make static. (procfs_meminfo): Make static, fix type name, add missing argument. (procfs_store_registers): Make static. (procfs_thread_info): Remove unused function. (_initialize_procfs): Forward declare.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/nto-low.c4
-rw-r--r--gdb/nto-procfs.c25
4 files changed, 29 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fcffe9b..d0af780 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,14 @@
+2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (common/filestuff.h): Include.
+ (procfs_can_use_hw_breakpoint): Fix enum name.
+ (procfs_open_1): Fix compiler warning.
+ (procfs_pidlist): Make static.
+ (procfs_meminfo): Make static, fix type name, add missing argument.
+ (procfs_store_registers): Make static.
+ (procfs_thread_info): Remove unused function.
+ (_initialize_procfs): Forward declare.
+
2015-10-16 Yao Qi <yao.qi@arm.com>
* MAINTAINERS: Update my email address.
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 3f4fa60..da1aff1 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
+ * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
+ variable name.
+
+2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
+
* inferiors.c (thread_pid_matches_callback): New function.
(find_thread_process): New function.
(remove_thread): Reset current_thread.
diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c
index fa216a9..97bd1e9 100644
--- a/gdb/gdbserver/nto-low.c
+++ b/gdb/gdbserver/nto-low.c
@@ -794,7 +794,7 @@ nto_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
{
int wtype = _DEBUG_BREAK_HW; /* Always request HW. */
- TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, len);
+ TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, size);
switch (type)
{
case raw_bkpt_type_sw:
@@ -826,7 +826,7 @@ nto_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
{
int wtype = _DEBUG_BREAK_HW; /* Always request HW. */
- TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, len);
+ TRACE ("%s type:%c addr: 0x%08lx len:%d\n", __func__, (int)type, addr, size);
switch (type)
{
case raw_bkpt_type_sw:
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index 20b05be..d659f79 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -40,6 +40,7 @@
#include "regcache.h"
#include "solib.h"
#include "inf-child.h"
+#include "common/filestuff.h"
#define NULL_PID 0
#define _DEBUG_FLAG_TRACE (_DEBUG_FLAG_TRACE_EXEC|_DEBUG_FLAG_TRACE_RD|\
@@ -54,7 +55,7 @@ static procfs_run run;
static ptid_t do_attach (ptid_t ptid);
static int procfs_can_use_hw_breakpoint (struct target_ops *self,
- enum target_hw_bp_type, int, int);
+ enum bptype, int, int);
static int procfs_insert_hw_watchpoint (struct target_ops *self,
CORE_ADDR addr, int len,
@@ -123,7 +124,7 @@ procfs_open_1 (struct target_ops *ops, const char *arg, int from_tty)
and only override it if there is a valid arg. */
nto_procfs_node = ND_LOCAL_NODE;
- nodestr = arg ? xstrdup (arg) : arg;
+ nodestr = arg ? xstrdup (arg) : NULL;
init_thread_list ();
@@ -353,7 +354,7 @@ do_closedir_cleanup (void *dir)
closedir (dir);
}
-void
+static void
procfs_pidlist (char *args, int from_tty)
{
DIR *dp = NULL;
@@ -445,7 +446,7 @@ procfs_pidlist (char *args, int from_tty)
return;
}
-void
+static void
procfs_meminfo (char *args, int from_tty)
{
procfs_mapinfo *mapinfos = NULL;
@@ -486,7 +487,7 @@ procfs_meminfo (char *args, int from_tty)
return;
}
- mapinfos = XNEWVEC (procfs_mapping, num);
+ mapinfos = XNEWVEC (procfs_mapinfo, num);
num_mapinfos = num;
mapinfo_p = mapinfos;
@@ -873,7 +874,8 @@ procfs_xfer_partial (struct target_ops *ops, enum target_object object,
return procfs_xfer_memory (readbuf, writebuf, offset, len, xfered_len);
default:
return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
- readbuf, writebuf, offset, len);
+ readbuf, writebuf, offset, len,
+ xfered_len);
}
}
@@ -1267,7 +1269,7 @@ get_regset (int regset, char *buf, int bufsize, int *regsize)
return dev_set;
}
-void
+static void
procfs_store_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
@@ -1349,13 +1351,6 @@ procfs_pass_signals (struct target_ops *self,
}
}
-static struct tidinfo *
-procfs_thread_info (pid_t pid, short tid)
-{
-/* NYI */
- return NULL;
-}
-
static char *
procfs_pid_to_str (struct target_ops *ops, ptid_t ptid)
{
@@ -1468,6 +1463,8 @@ init_procfs_targets (void)
#define OSTYPE_NTO 1
+extern initialize_file_ftype _initialize_procfs;
+
void
_initialize_procfs (void)
{