Re: Bug in powerpc gdb?

2005-11-07 Thread Till Straumann

Roger.

I suspect that some argument variables not being available is the result
of optimization or normal program flow.

Roger Leigh wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Till Straumann <[EMAIL PROTECTED]> writes:


-- snp

(gdb) bt
#0  sbuild_session_setup_chroot (session=0x1004e770,
session_chroot=0x1004bf60, setup_type=SBUILD_CHROOT_SETUP_START,
error=0x7fc04548) at sbuild-session.c:491
#1  0x10014488 in sbuild_session_run (session=0x1004e770, error=0x10054788)
at sbuild-session.c:1064
#2  0x10015304 in sbuild_cclosure_marshal_BOOLEAN__BOXED (closure=0x1004e0e0,
return_value=0x7fc04680, n_param_values=Variable "n_param_values" is not 
available.
) at sbuild-marshallers.c:162


If the register holding 'n_param_values' is overwritten/reused at the
time g_type_class_meta_marhal() is called then there is (in general)
no way for the unwinder to resurrect the value it held earlier.


#3  0x0fa7d9dc in g_type_class_meta_marshal (closure=0x1004e770,
return_value=0x7fade680, n_param_values=2, param_values=0x7fade790,
invocation_hint=0x7fade6a0, marshal_data=0x48) at gclosure.c:569




I'm not sure why some variables are "not available", but at least it
can now correctly walk through the stack.



good :-) I submitted PR2029 to the GDB bug database -- please use the
patch from there and not the earlier version I posted yesterday as it
contains an error.

--T.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Bug in powerpc gdb?

2005-05-16 Thread Till Straumann
I also experienced problems with the stack unwinder
when using more recent gcc optimization. The attached
patch may help (I thought I had sent it to the GDB
site but am unable to find it in the database).
HTH
-- Till
(CC me for questions/comments, I'm not subscribed)
Patch against gdb-6.2.1. To apply, run
 
  patch -p0 < 'this_file'
 
from the gdb-6.2.1 topdir. It's always a good
idea to try with the '--dry-run' option first.
 
Provides:
fixes a bug (triggered by newer gcc optimizations)
in the rs6000/powerpc stack unwinder.
 
Prerequisites:
n/a
 
 
Till Straumann, 3/14/2005
Index: gdb/rs6000-tdep.c
===
RCS file: /afs/slac/g/spear/cvsrep/tools/gdb/gdb/rs6000-tdep.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** gdb/rs6000-tdep.c   10 Nov 2004 18:25:48 -  1.1.1.1
--- gdb/rs6000-tdep.c   10 Nov 2004 18:39:09 -  1.2
***
*** 1184,1190 
 the search if we have no valid frame yet or if the return
 address is not yet saved in the frame.  */
  if (fdata->frameless == 0
! && (lr_reg == -1 || fdata->nosavedpc == 0))
break;
   
  if (op == 0x4e800020  /* blr */
--- 1184,1190 
 the search if we have no valid frame yet or if the return
 address is not yet saved in the frame.  */
  if (fdata->frameless == 0
! && (lr_reg != -1 && fdata->nosavedpc == 0))
break;
   
  if (op == 0x4e800020  /* blr */


Re: PowerPC kernels, partitioning on macppc

2005-05-23 Thread Till Straumann

Regarding PPC architecture, assembly etc.:

The 32-bit PowerPC architecture and assembly language
are extensively (including caches, MMU etc.) described e.g.,
here:

http://www.freescale.com/files/product/doc/MPCFPE32B.pdf

On the FreeScale (motorola) site you can also find documents
describing AltiVec and processor specific (e.g., 'G4' vs. 'G3')
implementation details.

I recommend to also peeking at the SYSVR4 ABI specification
which defines things like calling conventions, register usage
and the like:

http://www.omega-environment.com/documentation/SVR4abippc.pdf

Note that as always these links may be obsolete shortly as
the commercial world just loves to rearrange their websites
faster than the weather changes. google is your friend.

HTH
-- Till

PS: I'm not subscribed to the list.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]