public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/12013] New: MIPS tracepoint cannot collect stack info through collect *(unsigned char *)($sp)@512
@ 2010-09-14  3:36 teawater at gmail dot com
  0 siblings, 0 replies; only message in thread
From: teawater at gmail dot com @ 2010-09-14  3:36 UTC (permalink / raw)
  To: gdb-prs

I try MIPS tracepoint but when I want to use collect *(unsigned char *)($sp)@512 
to collect the stack info, but I got:
(gdb) actions 
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect *(unsigned char *)($sp)@512
'sp' is a pseudo-register; GDB cannot yet trace pseudoregister contents.

That is because in ax-gdb.c:
	reg = user_reg_map_name_to_regnum (exp->gdbarch, name, strlen (name));
	if (reg == -1)
	  internal_error (__FILE__, __LINE__,
			  _("Register $%s not available"), name);
	if (reg >= gdbarch_num_regs (exp->gdbarch))
	  error (_("'%s' is a pseudo-register; "
		   "GDB cannot yet trace pseudoregister contents."),
		 name);

In user_reg_map_name_to_regnum, it will call mips_register_name to get reg name:
But in function mips_register_name:
  /* Map [gdbarch_num_regs .. 2*gdbarch_num_regs) onto the raw registers, 
     but then don't make the raw register names visible.  */
  int rawnum = regno % gdbarch_num_regs (gdbarch);
  if (regno < gdbarch_num_regs (gdbarch))
    return "";

So it make user_reg_map_name_to_regnum just can return the "reg" bigger than 
gdbarch_num_regs.

Then it will get this error message.  Do you have some way to handle this issue?

-- 
           Summary: MIPS tracepoint cannot collect stack info through
                    collect *(unsigned char *)($sp)@512
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tdep
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: teawater at gmail dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=12013

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-14  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14  3:36 [Bug tdep/12013] New: MIPS tracepoint cannot collect stack info through collect *(unsigned char *)($sp)@512 teawater at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).