* [Buildroot] Debugging VICE emulator for AVR32
@ 2008-06-19 1:44 John Voltz
2008-06-19 5:52 ` [Buildroot] [BR-AVR32] " Hans-Christian Egtvedt
2008-06-19 7:05 ` [Buildroot] " Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: John Voltz @ 2008-06-19 1:44 UTC (permalink / raw)
To: buildroot
Hi,
For some time now, I have been trying to debug the VICE emulator in
buildroot. There seems to be a problem with uClibc 0.9.29. VICE will not
start on x86 or on AVR32, but it would run in the past on uClibc 0.9.28. In
fact, the old binary of VICE that I built for 0.9.28 will run with 0.9.29. I
find that strange. I'm hoping someone can help me make sense of the gdb
info. Here is where the segfault occurs immediately after starting VICE on
AVR32:
0x2ada63d4 <_pthread_cleanup_push_defer>: pushm r4-r7,lr
- 0x2ada63d6 <_pthread_cleanup_push_defer+2>: lddpc
r6,0x2ada63f0 <_pthread_cleanup_push_defer+28>
- 0x2ada63d8 <_pthread_cleanup_push_defer+4>: rsub r6,pc
- 0x2ada63da <_pthread_cleanup_push_defer+6>: mov r8,18
- 0x2ada63de <_pthread_cleanup_push_defer+10>: ld.w
r8,r6[r8<<0x2]
- 0x2ada63e2 <_pthread_cleanup_push_defer+14>: ld.w r8,r8[172]
- 0x2ada63e6 <_pthread_cleanup_push_defer+18>: cp.w r8,0
- 0x2ada63e8 <_pthread_cleanup_push_defer+20>: breq 0x2ada63ec
<_pthread_cleanup_push_defer+24>
- 0x2ada63ea <_pthread_cleanup_push_defer+22>: icall r8
- 0x2ada63ec <_pthread_cleanup_push_defer+24>: popm r4-r7,pc
- 0x2ada63ee <_pthread_cleanup_push_defer+26>: add r0,r0
- 0x2ada63f0 <_pthread_cleanup_push_defer+28>: *unknown*
- 0x2ada63f2 <_pthread_cleanup_push_defer+30>: breq 0x2ada6482
<__libc_pthread_init+38>
Register contents:
r0 {0x0}
r1 {0x2adddffc}
r2 {0x2adde000}
r3 {0x2adddff8}
r4 {0x7fc6b688}
r5 {0x0}
r6 {0x2ada9f58}
r7 {0x2add82e0}
r8 {0x2ada63d4}
r9 {0x0}
r10 {0x2adab600}
r11 {0x2ada6338}
r12 {0x7fc6b64c}
sp {0x7fa6e010}
lr {0x2ada63ec}
pc {0x2ada63d4}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080618/c34851b0/attachment.htm
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [BR-AVR32] Debugging VICE emulator for AVR32
2008-06-19 1:44 [Buildroot] Debugging VICE emulator for AVR32 John Voltz
@ 2008-06-19 5:52 ` Hans-Christian Egtvedt
2008-06-19 7:05 ` [Buildroot] " Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Hans-Christian Egtvedt @ 2008-06-19 5:52 UTC (permalink / raw)
To: buildroot
On Wed, 2008-06-18 at 21:44 -0400, John Voltz wrote:
> Hi,
>
> For some time now, I have been trying to debug the VICE emulator in
> buildroot. There seems to be a problem with uClibc 0.9.29. VICE will
> not start on x86 or on AVR32, but it would run in the past on uClibc
> 0.9.28. In fact, the old binary of VICE that I built for 0.9.28 will
> run with 0.9.29. I find that strange. I'm hoping someone can help me
> make sense of the gdb info. Here is where the segfault occurs
> immediately after starting VICE on AVR32:
>
Do you know exactly where it segfaults? Which line in the assembler dump
below? Which toolchain are you using? I would recommend using the
toolchain in the latest Buildroot for AVR32 v2.2.0-rc3.
> 0x2ada63d4 <_pthread_cleanup_push_defer>: pushm r4-r7,lr
> - 0x2ada63d6 <_pthread_cleanup_push_defer+2>: lddpc r6,0x2ada63f0 <_pthread_cleanup_push_defer+28>
> - 0x2ada63d8 <_pthread_cleanup_push_defer+4>: rsub r6,pc
Putting GOT pointer in r6.
> - 0x2ada63da <_pthread_cleanup_push_defer+6>: mov r8,18
> - 0x2ada63de <_pthread_cleanup_push_defer+10>: ld.w r8,r6[r8<<0x2]
Fetch a pointer from the GOT with offset 0x48 (18 << 0x02).
> - 0x2ada63e2 <_pthread_cleanup_push_defer+14>: ld.w r8,r8[172]
Then load something from an offset from the loaded pointer, accessing a
struct perhaps? Does not seem like r8 is zero at this point, given your
register dump below.
> - 0x2ada63e6 <_pthread_cleanup_push_defer+18>: cp.w r8,0
Compare it to zero, function pointer?
> - 0x2ada63e8 <_pthread_cleanup_push_defer+20>: breq 0x2ada63ec <_pthread_cleanup_push_defer+24>
> - 0x2ada63ea <_pthread_cleanup_push_defer+22>: icall r8
Jump to the fetched function(?).
> - 0x2ada63ec <_pthread_cleanup_push_defer+24>: popm r4-r7,pc
Return
> - 0x2ada63ee <_pthread_cleanup_push_defer+26>: add r0,r0
Alignment of local function data.
> - 0x2ada63f0 <_pthread_cleanup_push_defer+28>: *unknown*
> - 0x2ada63f2 <_pthread_cleanup_push_defer+30>: breq 0x2ada6482 <__libc_pthread_init+38>
>
Address of the GOT pointer.
Do not really see anything immediate wrong with this code.
> Register contents:
> r0 {0x0}
> r1 {0x2adddffc}
> r2 {0x2adde000}
> r3 {0x2adddff8}
> r4 {0x7fc6b688}
> r5 {0x0}
> r6 {0x2ada9f58}
> r7 {0x2add82e0}
> r8 {0x2ada63d4}
> r9 {0x0}
> r10 {0x2adab600}
> r11 {0x2ada6338}
> r12 {0x7fc6b64c}
> sp {0x7fa6e010}
> lr {0x2ada63ec}
> pc {0x2ada63d4}
>
--
With kind regards,
Hans-Christian Egtvedt, Applications Engineer
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] Debugging VICE emulator for AVR32
2008-06-19 1:44 [Buildroot] Debugging VICE emulator for AVR32 John Voltz
2008-06-19 5:52 ` [Buildroot] [BR-AVR32] " Hans-Christian Egtvedt
@ 2008-06-19 7:05 ` Peter Korsgaard
2008-07-22 19:31 ` Mark Jackson
1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2008-06-19 7:05 UTC (permalink / raw)
To: buildroot
>>>>> "John" == John Voltz <john.voltz@gmail.com> writes:
John> Hi,
John> For some time now, I have been trying to debug the VICE
John> emulator in buildroot. There seems to be a problem with uClibc
John> 0.9.29. VICE will not start on x86 or on AVR32, but it would
John> run in the past on uClibc 0.9.28. In fact, the old binary of
John> VICE that I built for 0.9.28 will run with 0.9.29. I find that
John> strange. I'm hoping someone can help me make sense of the gdb
John> info. Here is where the segfault occurs immediately after
John> starting VICE on AVR32:
I've also noticed pthread problems with avahi on uclibc 0.9.29 (on
PPC), but I haven't had time to debug it yet. The same setup works
with 0.9.28.3.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Debugging VICE emulator for AVR32
2008-06-19 7:05 ` [Buildroot] " Peter Korsgaard
@ 2008-07-22 19:31 ` Mark Jackson
2008-07-22 19:34 ` John Voltz
0 siblings, 1 reply; 5+ messages in thread
From: Mark Jackson @ 2008-07-22 19:31 UTC (permalink / raw)
To: buildroot
Peter Korsgaard wrote:
> I've also noticed pthread problems with avahi on uclibc 0.9.29 (on
> PPC), but I haven't had time to debug it yet. The same setup works
> with 0.9.28.3
Hi Peter,
I'm also having problems with avahi-daemon segfaulting (on the NGW100
defconfig plus avahi).
I raised a ticket on avahi.org (http://avahi.org/ticket/224), and after
a bit of novice gdb investgations have shown up a "pthread" function may
well be the cause.
In case of a post 0.9.29 bug fix, I did try to use the uclibc daily
snapshot, but it didn't compile at all.
Did you manage to get anywhere with this, or is it still outstanding ?
Regards
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpfj.vcf
Type: text/x-vcard
Size: 290 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20080722/ada74086/attachment.vcf
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Debugging VICE emulator for AVR32
2008-07-22 19:31 ` Mark Jackson
@ 2008-07-22 19:34 ` John Voltz
0 siblings, 0 replies; 5+ messages in thread
From: John Voltz @ 2008-07-22 19:34 UTC (permalink / raw)
To: buildroot
My problem was that VICE wasn't being linked against libpthread. Simply
adding a LDFLAGS="-lpthread" to the configure statement fixed it.
John
On Tue, Jul 22, 2008 at 3:31 PM, Mark Jackson <mpfj@mimc.co.uk> wrote:
> Peter Korsgaard wrote:
>
>> I've also noticed pthread problems with avahi on uclibc 0.9.29 (on
>> PPC), but I haven't had time to debug it yet. The same setup works
>> with 0.9.28.3
>>
> Hi Peter,
>
> I'm also having problems with avahi-daemon segfaulting (on the NGW100
> defconfig plus avahi).
>
> I raised a ticket on avahi.org (http://avahi.org/ticket/224), and after a
> bit of novice gdb investgations have shown up a "pthread" function may well
> be the cause.
>
> In case of a post 0.9.29 bug fix, I did try to use the uclibc daily
> snapshot, but it didn't compile at all.
>
> Did you manage to get anywhere with this, or is it still outstanding ?
>
> Regards
> Mark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080722/2a9a5c32/attachment.htm
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-22 19:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-19 1:44 [Buildroot] Debugging VICE emulator for AVR32 John Voltz
2008-06-19 5:52 ` [Buildroot] [BR-AVR32] " Hans-Christian Egtvedt
2008-06-19 7:05 ` [Buildroot] " Peter Korsgaard
2008-07-22 19:31 ` Mark Jackson
2008-07-22 19:34 ` John Voltz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox