This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems remote debugging an uClinux/armnommu target.


Hello!

I am trying to get remote debugging with insight-6.6 on an armnommu
target
running uClinux.

I had to apply some minor changes to get it compile.  With the attached
patch, at least gdb seems to run as expected.  But I have still problems
with insight:

- Selecting "attach to target" and "continue" works.  But when I press
  the "Run" button, the remote gdbserver is killed.  After that, the
  "configure target" dialog pops up and keeps opening whenever I close
  it.  The only way to get rid of it is to completely quit insight.

- When a new session is started with an already opened "memory" window,
  is opened, insight tries to display the contents of the (arbitrary)
  address that is selected in that window.  This almost always results
  in a bus error when gdbserver tries to access this address.

Any ideas how I can track down those problems?

Here's the patch I mentioned above.

diff --exclude='*.svn*' -ur gdb-6.6.orig/gdb/gdbserver/linux-arm-low.c
gdb-6.6/gdb/gdbserver/linux-arm-low.c
--- gdb-6.6.orig/gdb/gdbserver/linux-arm-low.c	2006-05-30
17:57:09.000000000 +0200
+++ gdb-6.6/gdb/gdbserver/linux-arm-low.c	2007-03-12
11:11:16.000000000 +0100
@@ -32,7 +32,7 @@
 #endif
 
 #ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
+//#include <sys/reg.h>
 #endif
 
 #define arm_num_regs 26
diff --exclude='*.svn*' -urN gdb-6.6.orig/readline/configure
gdb-6.6/readline/configure
--- gdb-6.6.orig/readline/configure	2006-05-05 20:26:12.000000000
+0200
+++ gdb-6.6/readline/configure	2007-03-07 15:04:46.000000000 +0100
@@ -312,7 +312,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix
program_transform_name bindir sbindir libexecdir datadir sysconfdir
sharedstatedir localstatedir libdir includedir oldincludedir infodir
mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T
LIBS build build_cpu build_vendor build_os host host_cpu host_vendor
host_os CROSS_COMPILE SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC
EXEEXT OBJEXT CPP EGREP CC_FOR_BUILD INSTALL_PROGRAM INSTALL_SCRIPT
INSTALL_DATA AR RANLIB ac_ct_RANLIB MAKE_SHELL WCWIDTH_OBJ SHOBJ_CC
SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS
SHOBJ_STATUS SHLIB_STATUS SHLIB_XLDFLAGS SHLIB_DOT SHLIB_LIBPREF
SHLIB_LIBSUFF SHLIB_LIBVERSION SHLIB_DLLVERSION SHLIB_LIBS SHLIB_MAJOR
SHLIB_MINOR STATIC_TARGET SHARED_TARGET STATIC_INSTALL_TARGET
SHARED_INSTALL_TARGET PURIFY BUILD_DIR LOCAL_CFLAGS LOCAL_LDFLAGS
LOCAL_DEFS ARFLAGS LIBVERSION TERMCAP_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix
program_transform_name bindir sbindir libexecdir datadir sysconfdir
sharedstatedir localstatedir libdir includedir oldincludedir infodir
mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T
LIBS build build_cpu build_vendor build_os host host_cpu host_vendor
host_os DO_CROSS_COMPILE SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC
EXEEXT OBJEXT CPP EGREP CC_FOR_BUILD INSTALL_PROGRAM INSTALL_SCRIPT
INSTALL_DATA AR RANLIB ac_ct_RANLIB MAKE_SHELL WCWIDTH_OBJ SHOBJ_CC
SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS
SHOBJ_STATUS SHLIB_STATUS SHLIB_XLDFLAGS SHLIB_DOT SHLIB_LIBPREF
SHLIB_LIBSUFF SHLIB_LIBVERSION SHLIB_DLLVERSION SHLIB_LIBS SHLIB_MAJOR
SHLIB_MINOR STATIC_TARGET SHARED_TARGET STATIC_INSTALL_TARGET
SHARED_INSTALL_TARGET PURIFY BUILD_DIR LOCAL_CFLAGS LOCAL_LDFLAGS
LOCAL_DEFS ARFLAGS LIBVERSION TERMCAP_LIB LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -1475,7 +1475,7 @@
         . ${cross_cache}
     fi
     unset cross_cache
-    CROSS_COMPILE='-DCROSS_COMPILING'
+    DO_CROSS_COMPILE='-DCROSS_COMPILING'
 
 fi
 
@@ -8723,7 +8723,7 @@
 s,@host_cpu@,$host_cpu,;t t
 s,@host_vendor@,$host_vendor,;t t
 s,@host_os@,$host_os,;t t
-s,@CROSS_COMPILE@,$CROSS_COMPILE,;t t
+s,@DO_CROSS_COMPILE@,$DO_CROSS_COMPILE,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
 s,@CC@,$CC,;t t
 s,@CFLAGS@,$CFLAGS,;t t
diff --exclude='*.svn*' -urN gdb-6.6.orig/readline/configure.in
gdb-6.6/readline/configure.in
--- gdb-6.6.orig/readline/configure.in	2006-05-05 20:26:12.000000000
+0200
+++ gdb-6.6/readline/configure.in	2007-03-07 15:04:24.000000000
+0100
@@ -96,8 +96,8 @@
         . ${cross_cache}
     fi
     unset cross_cache
-    CROSS_COMPILE='-DCROSS_COMPILING'
-    AC_SUBST(CROSS_COMPILE)
+    DO_CROSS_COMPILE='-DCROSS_COMPILING'
+    AC_SUBST(DO_CROSS_COMPILE)
 fi
 
 echo ""
diff --exclude='*.svn*' -urN gdb-6.6.orig/readline/Makefile.in
gdb-6.6/readline/Makefile.in
--- gdb-6.6.orig/readline/Makefile.in	2006-10-21 22:47:07.000000000
+0200
+++ gdb-6.6/readline/Makefile.in	2007-03-07 15:04:01.000000000
+0100
@@ -73,7 +73,7 @@
 LOCAL_CFLAGS = @LOCAL_CFLAGS@
-DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
 CPPFLAGS = @CPPFLAGS@
 
-DEFS = @DEFS@ @CROSS_COMPILE@
+DEFS = @DEFS@ @DO_CROSS_COMPILE@
 LOCAL_DEFS = @LOCAL_DEFS@
 
 TERMCAP_LIB = @TERMCAP_LIB@
diff -ruw gdb-6.6.orig/gdb/gdbserver/linux-low.c
gdb-6.6/gdb/gdbserver/linux-low.c
--- gdb-6.6.orig/gdb/gdbserver/linux-low.c	2006-10-17
18:02:27.000000000 +0200
+++ gdb-6.6/gdb/gdbserver/linux-low.c	2007-03-19 17:39:07.000000000
+0100
@@ -1587,7 +1587,7 @@
 }
 
 #if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_MMU__)
-#if defined(__mcoldfire__)
+#if 1 || defined(__mcoldfire__)
 /* These should really be defined in the kernel's ptrace.h header.  */
 #define PT_TEXT_ADDR 49*4
 #define PT_DATA_ADDR 50*4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]