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

Reply via email to