This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: RFA: ia64 portion of libunwind patch


On Oct 24,  2:52pm, Marcel Moolenaar wrote:

> On Fri, Oct 24, 2003 at 11:56:25AM -0700, Kevin Buettner wrote:

> > I would prefer to see <sys/syscall.h> included -- but not in
> > ia64-tdep.c.  This include and the code for ia64_getunwind() will have
> > to go in ia64-linux-nat.c.  Presumably, if a remote target wanted to
> > use the unwind library, there'd need to be some remote protocol
> > modifications.
> 
> Isn't the unwind library linked into gdb and using callbacks for
> memory reads and obtaining register values so that we can use the
> existing protocol commands to extract information from the inferior?

I haven't looked recently (and don't remember from when I did look at
it), but I would hope it would do something along those lines.

Unfortunately, the patch which Jeff submitted contains the following:

+#ifdef HAVE_LIBUNWIND_IA64_H
+
+# ifndef __NR_getunwind
+#  define __NR_getunwind	1215
+# endif
+
+static unsigned long
+ia64_getunwind (void *buf, size_t len)
+{
+  return syscall (__NR_getunwind, buf, len);
+}

where ia64_getunwind() is called from within get_kernel_table() (which
is also new).

Anyway, this sort of thing needs to go in a *-nat.c file.  Corresponding
methods need to be created so that we'll be able to fetch this information
from a remote target.

Kevin


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