Thank you, sir:-) I followed your advice, modified the unameFunc, and it worked. But another error occurred:
535500: system.cpu T0 : @__register_atfork+12 : addiu r29, r29, -56 : IntAlu : D=0x000000007fffdc20 536000: system.cpu T0 : @__register_atfork+16 : sw r31, 48(r29) : MemWrite : D=0x00000000004049f4 A=0x7fffdc50 536500: system.cpu T0 : @__register_atfork+20 : sw r21, 44(r29) : MemWrite : D=0x0000000000400c68 A=0x7fffdc4c 537000: system.cpu T0 : @__register_atfork+24 : sw r20, 40(r29) : MemWrite : D=0x0000000000000000 A=0x7fffdc48 537500: system.cpu T0 : @__register_atfork+28 : sw r19, 36(r29) : MemWrite : D=0x0000000000480000 A=0x7fffdc44 538000: system.cpu T0 : @__register_atfork+32 : sw r18, 32(r29) : MemWrite : D=0x0000000000480000 A=0x7fffdc40 538500: system.cpu T0 : @__register_atfork+36 : sw r17, 28(r29) : MemWrite : D=0x0000000000483e80 A=0x7fffdc3c 539000: system.cpu T0 : @__register_atfork+40 : sw r16, 24(r29) : MemWrite : D=0x0000000000485ce8 A=0x7fffdc38 539500: system.cpu T0 : @__register_atfork+44 : sw r28, 16(r29) : MemWrite : D=0x000000000048c1e0 A=0x7fffdc30 540000: system.cpu T0 : @__register_atfork+48 : addu r18, r4, r0 : IntAlu : D=0x00000000004090c0 540500: system.cpu T0 : @__register_atfork+52 : addu r19, r5, r0 : IntAlu : D=0x0000000000408990 541000: system.cpu T0 : @__register_atfork+56 : addu r20, r6, r0 : IntAlu : D=0x0000000000403c60 541500: system.cpu T0 : @__register_atfork+60 : addu r21, r7, r0 : IntAlu : D=0x0000000000000000 542000: system.cpu T0 : @__register_atfork+64 : addu r3, r0, r0 : IntAlu : D=0x0000000000000000 542500: system.cpu T0 : @__register_atfork+68 : addiu r2, r0, 1 : IntAlu : D=0x0000000000000001 543000: system.cpu T0 : @__register_atfork+72 : lw r16, -31876(r28) : MemRead : D=0x0000000000485de0 A=0x48455c 543500: system.cpu T0 : @__register_atfork+76 : ll r5, 0(r16) : MemRead : D=0x0000000000000000 A=0x485de0 544000: system.cpu T0 : @__register_atfork+80 : bne r5, r3, 0x40d5cc : IntAlu : warn: 544000: Halting thread 0 in system.cpu @ PC 40d5b4, setting restart PC to 40d5b8 Exiting @ tick 9223372036854775807 because simulate() limit reached It seems that the program has reached some simulation limit, and within the trace I found the following output: 289000: system.cpu T0 : @__libc_setup_tls+296 : lw r28, 16(r29) : MemRead : D=0x000000000048c1e0 A=0x7fffdd28 289500: system.cpu T0 : @__libc_setup_tls+300 : addiu r4, r16, 28672 : IntAlu : D=0x000000000048f470 290000: system.cpu T0 : @__libc_setup_tls+304 : lw r2, -32744(r28) : MemRead : D=0x0000000000480000 A=0x4841f8 290500: system.cpu T0 : @__libc_setup_tls+308 : addiu r2, r2, 20248 : IntAlu : D=0x0000000000484f18 291000: system.cpu T0 : @__libc_setup_tls+312 : sw r2, -8(r16) : MemWrite : D=0x0000000000484f18 A=0x488468 291500: system.cpu T0 : @__libc_setup_tls+316 : addiu r2, r0, 4283 : IntAlu : D=0x00000000000010bb 292000: system.cpu T0 : @__libc_setup_tls+320 : syscall_se , r2 : IntAlu : 292500: system.cpu T0 : @__libc_setup_tls+324 : beq r7, r0, 0x400acc : IntAlu : 293000: system.cpu T0 : @__libc_setup_tls+328 : lw r5, -32744(r28) : MemRead : D=0x0000000000480000 A=0x4841f8 293500: system.cpu T0 : @__libc_setup_tls+368 : lw r3, 596(r18) : MemRead : D=0x0000000000000000 A=0x48556c 294000: system.cpu T0 : @__libc_setup_tls+372 : addiu r2, r0, -4 : IntAlu : D=0x00000000fffffffc 294500: system.cpu T0 : @__libc_setup_tls+376 : and r3, r3, r2 : IntAlu : D=0x0000000000000000 295000: system.cpu T0 : @__libc_setup_tls+380 : lw r2, -30696(r28) : MemRead : D=0x0000000000484e10 A=0x4849f8 295500: system.cpu T0 : @__libc_setup_tls+384 : addiu r4, r5, 20752 : IntAlu : D=0x0000000000485110 296000: system.cpu T0 : @__libc_setup_tls+388 : addiu r6, r0, 1 : IntAlu : D=0x0000000000000001 296500: system.cpu T0 : @__libc_setup_tls+392 : sw r6, 0(r2) : MemWrite : D=0x0000000000000001 A=0x484e10 297000: system.cpu T0 : @__libc_setup_tls+396 : sw r18, 20(r4) : MemWrite : D=0x0000000000485318 A=0x485124 297500: system.cpu T0 : @__libc_setup_tls+400 : sw r3, 596(r18) : MemWrite : D=0x0000000000000000 A=0x48556c 298000: system.cpu T0 : @__libc_setup_tls+404 : lw r3, -31148(r28) : MemRead : D=0x0000000000484e14 A=0x484834 298500: system.cpu T0 : @__libc_setup_tls+408 : addiu r2, r0, 64 : IntAlu : D=0x0000000000000040 299000: system.cpu T0 : @__libc_setup_tls+412 : sw r22, 744(r18) : MemWrite : D=0x000000000048144c A=0x485600 299500: system.cpu T0 : @__libc_setup_tls+416 : sw r23, 748(r18) : MemWrite : D=0x0000000000000010 A=0x485604 300000: system.cpu T0 : @__libc_setup_tls+420 : sw r2, 20752(r5) : MemWrite : D=0x0000000000000040 A=0x485110 300500: system.cpu T0 : @__libc_setup_tls+424 : sw r4, 0(r3) : MemWrite : D=0x0000000000485110 A=0x484e14 301000: system.cpu T0 : @__libc_setup_tls+428 : sw r17, 756(r18) : MemWrite : D=0x0000000000000004 A=0x48560c 301500: system.cpu T0 : @__libc_setup_tls+432 : sw r21, 752(r18) : MemWrite : D=0x0000000000000028 A=0x485608 302000: system.cpu T0 : @__libc_setup_tls+436 : beq r17, r0, 0x400ba4 : IntAlu : 302500: system.cpu T0 : @__libc_setup_tls+440 : sw r6, 768(r18) : MemWrite : D=0x0000000000000001 A=0x485618 303000: system.cpu T0 : @__libc_setup_tls+444 : addu r2, r21, r17 : IntAlu : D=0x000000000000002c 303500: system.cpu T0 : @__libc_setup_tls+448 : addiu r2, r2, -1 : IntAlu : D=0x000000000000002b 304000: system.cpu T0 : @__libc_setup_tls+452 : divu r2, r17 : IntDiv : D=0x0000000000000003 304500: system.cpu T0 : @__libc_setup_tls+456 : teq , r17, r0 : IntAlu : 305000: system.cpu T0 : @__libc_setup_tls+460 : mflo r21 : IntMult : D=0x000000000000000a 305500: system.cpu T0 : @__libc_setup_tls+464 : mul r3, r21, r17 : IntMult : D=0x0000000000000028 306000: system.cpu T0 : @__libc_setup_tls+468 : lw r2, 0(r30) : MemRead : D=0x0000000000000800 A=0x483a30 306500: system.cpu T0 : @__libc_setup_tls+472 : addu r6, r3, r19 : IntAlu : D=0x0000000000000028 307000: system.cpu T0 : @__libc_setup_tls+476 : addiu r2, r2, 15 : IntAlu : D=0x000000000000080f 307500: system.cpu T0 : @__libc_setup_tls+480 : addu r2, r2, r6 : IntAlu : D=0x0000000000000837 308000: system.cpu T0 : @__libc_setup_tls+484 : addiu r4, r0, -16 : IntAlu : D=0x00000000fffffff0 308500: system.cpu T0 : @__libc_setup_tls+488 : and r2, r2, r4 : IntAlu : D=0x0000000000000830 309000: system.cpu T0 : @__libc_setup_tls+492 : sltiu r3, r20, 16 : IntAlu : D=0x0000000000000000 309500: system.cpu T0 : @__libc_setup_tls+496 : sw r2, 0(r30) : MemWrite : D=0x0000000000000830 A=0x483a30 310000: system.cpu T0 : @__libc_setup_tls+500 : addiu r5, r0, 16 : IntAlu : D=0x0000000000000010 310500: system.cpu T0 : @__libc_setup_tls+504 : lw r2, -30676(r28) : MemRead : D=0x0000000000484e0c A=0x484a0c 311000: system.cpu T0 : @__libc_setup_tls+508 : movz r5, r5, r20 : IntAlu : D=0x0000000000000010 311500: system.cpu T0 : @__libc_setup_tls+512 : lw r3, -30284(r28) : MemRead : D=0x0000000000484e08 A=0x484b94 312000: system.cpu T0 : @__libc_setup_tls+516 : sw r5, 0(r2) : MemWrite : D=0x0000000000000010 A=0x484e0c 312500: system.cpu T0 : @__libc_setup_tls+520 : lw r31, 60(r29) : MemRead : D=0x0000000000400508 A=0x7fffdd54 313000: system.cpu T0 : @__libc_setup_tls+524 : lw r2, -31956(r28) : MemRead : D=0x0000000000484e20 A=0x48450c 313500: system.cpu T0 : @__libc_setup_tls+528 : lw r30, 56(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd50 314000: system.cpu T0 : @__libc_setup_tls+532 : lw r23, 52(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd4c 314500: system.cpu T0 : @__libc_setup_tls+536 : lw r22, 48(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd48 315000: system.cpu T0 : @__libc_setup_tls+540 : lw r21, 44(r29) : MemRead : D=0x0000000000400c68 A=0x7fffdd44 315500: system.cpu T0 : @__libc_setup_tls+544 : lw r20, 40(r29) : MemRead : D=0x0000000000400bf0 A=0x7fffdd40 316000: system.cpu T0 : @__libc_setup_tls+548 : lw r19, 36(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd3c 316500: system.cpu T0 : @__libc_setup_tls+552 : lw r18, 32(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd38 317000: system.cpu T0 : @__libc_setup_tls+556 : lw r17, 28(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd34 317500: system.cpu T0 : @__libc_setup_tls+560 : lw r16, 24(r29) : MemRead : D=0x0000000000000000 A=0x7fffdd30 318000: system.cpu T0 : @__libc_setup_tls+564 : sw r6, 0(r3) : MemWrite : D=0x0000000000000028 A=0x484e08 318500: system.cpu T0 : @__libc_setup_tls+568 : addiu r29, r29, 64 : IntAlu : D=0x000000007fffdd58 319000: system.cpu T0 : @__libc_setup_tls+572 : addiu r3, r0, 1 : IntAlu : D=0x0000000000000001 319500: system.cpu T0 : @__libc_setup_tls+576 : jr f166, r31 : IntAlu : 320000: system.cpu T0 : @__libc_setup_tls+580 : sw r3, 0(r2) : MemWrite : D=0x0000000000000001 A=0x484e20 Does this mean the program has the TLS enabled? Is this due to some mis-configuration of my cross compiler? Can I just have a copy of your cross compiler used to build the mips program? Thank you for your help, sir. Best wishes:-) Yours sincerely Xuehan Xu On 28 September 2011 09:26, Gabriel Michael Black <[email protected]>wrote: > It tries to read a blob, of course :-). Seriously though, that's what it > does. There's a readBlob function which reads a chunk of memory into a > buffer. It's supposed to be a higher level function which breaks the chunk > into pieces that the memory system can handle and then put the results back > together when giving you the answer. Since it's not guaranteed to work (the > address may be bad, etc.) there's a tryReadBlob function which does the same > thing, it just returns whether there was a problem instead of complaining > about it. > > Looking at the trace you have below, I'm guessing that a system call is > happening and that that isn't happening properly. The address used is > 0x160046bbd0, I think, and that looks like a valid address with junk on the > end. If you open your binary with gdb and look at address 0x46bbd0, you'll > probably find a string reporting some sort of error. > > Judging from the fact that this error is coming from glibc and its being > pretty pretty early in execution, I'm guessing either it thinks the kernel > is too old (you can change the version it thinks it's using by changing the > unameFunc for MIPS) or some other aspect of its initial environment is > wrong. Once you look at the string at that address, you'll get a better idea > of what the problem is. > > Gabe > > > Quoting Xuehan Xu <[email protected]>: > > Hi, everyone. >> >> I compiled the source code of "hello" in the directory >> "test/test-progs/hello/src" like this: >> >> mips-linux-gnu-gcc --static -EL -o hello hello.c >> >> But when I run the hello program, the following error occured: >> >> 306500: system.cpu T0 : @__libc_message+460 : addu r19, r4, r0 >> : IntAlu : D=0x000000007fffd7e0 >> 307000: system.cpu T0 : @__libc_message+464 : bne r17, r0, >> 0x401494 : IntAlu : >> 307500: system.cpu T0 : @__libc_message+468 : addu r5, r16, r0 >> : IntAlu : D=0x000000000047e8de >> 308000: system.cpu T0 : @__libc_message+472 : sll r3, r18, 3 >> : IntAlu : D=0x0000000000000008 >> 308500: system.cpu T0 : @__libc_message+476 : addiu r2, r3, 8 >> : IntAlu : D=0x0000000000000010 >> 309000: system.cpu T0 : @__libc_message+480 : subu r29, r29, r2 >> : IntAlu : D=0x000000007fffd7c0 >> 309500: system.cpu T0 : @__libc_message+484 : addiu r17, r29, 16 >> : IntAlu : D=0x000000007fffd7d0 >> 310000: system.cpu T0 : @__libc_message+488 : addu r6, r17, r3 >> : IntAlu : D=0x000000007fffd7d8 >> 310500: system.cpu T0 : @__libc_message+492 : addu r5, r4, r0 >> : IntAlu : D=0x000000007fffd7e0 >> 311000: system.cpu T0 : @__libc_message+496 : addu r16, r0, r0 >> : IntAlu : D=0x0000000000000000 >> 311500: system.cpu T0 : @__libc_message+500 : addu r7, r0, r0 >> : IntAlu : D=0x0000000000000000 >> 312000: system.cpu T0 : @__libc_message+504 : lw r2, 4(r5) >> : MemRead : D=0x0000000000000016 A=0x7fffd7e4 >> 312500: system.cpu T0 : @__libc_message+508 : lw r4, 0(r5) >> : MemRead : D=0x000000000046bbd0 A=0x7fffd7e0 >> 313000: system.cpu T0 : @__libc_message+512 : sw r2, -4(r6) >> : MemWrite : D=0x0000000000000016 A=0x7fffd7d4 >> 313500: system.cpu T0 : @__libc_message+516 : lw r3, 4(r5) >> : MemRead : D=0x0000000000000016 A=0x7fffd7e4 >> 314000: system.cpu T0 : @__libc_message+520 : addiu r7, r7, 1 >> : IntAlu : D=0x0000000000000001 >> 314500: system.cpu T0 : @__libc_message+524 : sw r4, -8(r6) >> : MemWrite : D=0x000000000046bbd0 A=0x7fffd7d0 >> 315000: system.cpu T0 : @__libc_message+528 : addu r16, r16, r3 >> : IntAlu : D=0x0000000000000016 >> 315500: system.cpu T0 : @__libc_message+532 : lw r5, 8(r5) >> : MemRead : D=0x0000000000000000 A=0x7fffd7e8 >> 316000: system.cpu T0 : @__libc_message+536 : bne r18, r7, >> 0x401558 : IntAlu : >> 316500: system.cpu T0 : @__libc_message+540 : addiu r6, r6, -8 >> : IntAlu : D=0x000000007fffd7d0 >> 317000: system.cpu T0 : @__libc_message+544 : addu r4, r20, r0 >> : IntAlu : D=0x0000000000000003 >> 317500: system.cpu T0 : @__libc_message+548 : addu r5, r17, r0 >> : IntAlu : D=0x000000007fffd7d0 >> 318000: system.cpu T0 : @__libc_message+552 : addu r6, r18, r0 >> : IntAlu : D=0x0000000000000001 >> 318500: system.cpu T0 : @__libc_message+556 : addiu r2, r0, 4146 >> : IntAlu : D=0x0000000000001032 >> fatal: readBlob(0x160046bbd0, ...) failed >> @ cycle 319000 >> [readBlob:build/MIPS_SE/mem/**translating_port.cc, line 74] >> Memory Usage: 558728 KBytes >> >> The compiler I used is "mips-4.2-85-mips-linux-gnu". >> So I took a look at the source code, it seems to be cause by the >> function tryreadBlob returning false, can anyone tell me what does the >> function "readBlob" do? >> Thank you:-) >> >> > > ______________________________**_________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/**mailman/listinfo/gem5-users<http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users> >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
