Discussion:
Remote debugging using gdb
(too old to reply)
Lingxiao Jia
2015-08-19 14:54:45 UTC
Permalink
Hi all,

I am using gdb to remote debug program running on ARM architecture. I am
running in SE mode. When I try to dumpstat and checkpoint from the remote
debugger using call m5_xxx(), gem5 panics: page table fault when accessing
virtual address 0...
I included util/m5/m5op.h in my source file, and compiled with m5op_arm.S
statically.

The m5_xxx methods work fine if I directly call them in the program. Can I
really call function in remote debugging session?
--
Best regards,

Lingxiao Jia
Lingxiao Jia
2015-08-24 15:13:09 UTC
Permalink
Hi all,

Can anyone help with this issue? I am still not finding how to deal with
this.

Thanks.
Post by Lingxiao Jia
Hi all,
I am using gdb to remote debug program running on ARM architecture. I am
running in SE mode. When I try to dumpstat and checkpoint from the remote
debugger using call m5_xxx(), gem5 panics: page table fault when accessing
virtual address 0...
I included util/m5/m5op.h in my source file, and compiled with m5op_arm.S
statically.
The m5_xxx methods work fine if I directly call them in the program. Can I
really call function in remote debugging session?
--
Best regards,
Lingxiao Jia
--
Best regards,

Lingxiao Jia

莟凌霄


Electrical & Computer Engineering (ECE)

The University of Texas at Austin (UT-Austin)
Steve Reinhardt
2015-08-25 00:26:53 UTC
Permalink
You can call functions from gdb, but most functions are not designed to be
called from gdb. What arguments does the function expect, and what
arguments are you providing?
Post by Lingxiao Jia
Hi all,
Can anyone help with this issue? I am still not finding how to deal with
this.
Thanks.
Post by Lingxiao Jia
Hi all,
I am using gdb to remote debug program running on ARM architecture. I am
running in SE mode. When I try to dumpstat and checkpoint from the remote
debugger using call m5_xxx(), gem5 panics: page table fault when accessing
virtual address 0...
I included util/m5/m5op.h in my source file, and compiled with m5op_arm.S
statically.
The m5_xxx methods work fine if I directly call them in the program. Can
I really call function in remote debugging session?
--
Best regards,
Lingxiao Jia
--
Best regards,
Lingxiao Jia
莟凌霄
Electrical & Computer Engineering (ECE)
The University of Texas at Austin (UT-Austin)
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Lingxiao Jia
2015-08-25 04:46:23 UTC
Permalink
Hi Steve,

I know how to use gdb to debug, but now I want to remote debug the guest
code directly using gdb in SE mode, and I want to dump stats and create
checkpoints at breakpoints. However, this doesn't work and gem5 panics and
reports: page table fault when accessing virtual address 0... I don't know
if I can call function in remote debugging session. Thanks.
Post by Steve Reinhardt
You can call functions from gdb, but most functions are not designed to be
called from gdb. What arguments does the function expect, and what
arguments are you providing?
Post by Lingxiao Jia
Hi all,
Can anyone help with this issue? I am still not finding how to deal with
this.
Thanks.
Post by Lingxiao Jia
Hi all,
I am using gdb to remote debug program running on ARM architecture. I am
running in SE mode. When I try to dumpstat and checkpoint from the remote
debugger using call m5_xxx(), gem5 panics: page table fault when accessing
virtual address 0...
I included util/m5/m5op.h in my source file, and compiled with
m5op_arm.S statically.
The m5_xxx methods work fine if I directly call them in the program. Can
I really call function in remote debugging session?
--
Best regards,
Lingxiao Jia
--
Best regards,
Lingxiao Jia
莟凌霄
Electrical & Computer Engineering (ECE)
The University of Texas at Austin (UT-Austin)
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Best regards,

Lingxiao Jia

莟凌霄


Electrical & Computer Engineering (ECE)

The University of Texas at Austin (UT-Austin)
Steve Reinhardt
2015-08-25 15:05:30 UTC
Permalink
Sorry! I read your email too quickly and missed that distinction.

I've never tried to call a function using the remote debugger. Your best
bet is to look at what's happening on the remote gdb interface to figure
out what's going wrong. Probably gem5 should just be reporting the page
fault back to gdb rather than panicking. I think there's a RemoteGDB debug
flag that could give you some clues.

Steve
Post by Lingxiao Jia
Hi Steve,
I know how to use gdb to debug, but now I want to remote debug the guest
code directly using gdb in SE mode, and I want to dump stats and create
checkpoints at breakpoints. However, this doesn't work and gem5 panics and
reports: page table fault when accessing virtual address 0... I don't
know if I can call function in remote debugging session. Thanks.
Post by Steve Reinhardt
You can call functions from gdb, but most functions are not designed to
be called from gdb. What arguments does the function expect, and what
arguments are you providing?
Post by Lingxiao Jia
Hi all,
Can anyone help with this issue? I am still not finding how to deal with
this.
Thanks.
Post by Lingxiao Jia
Hi all,
I am using gdb to remote debug program running on ARM architecture. I
am running in SE mode. When I try to dumpstat and checkpoint from the
remote debugger using call m5_xxx(), gem5 panics: page table fault when
accessing virtual address 0...
I included util/m5/m5op.h in my source file, and compiled with
m5op_arm.S statically.
The m5_xxx methods work fine if I directly call them in the program.
Can I really call function in remote debugging session?
--
Best regards,
Lingxiao Jia
--
Best regards,
Lingxiao Jia
莟凌霄
Electrical & Computer Engineering (ECE)
The University of Texas at Austin (UT-Austin)
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Best regards,
Lingxiao Jia
莟凌霄
Electrical & Computer Engineering (ECE)
The University of Texas at Austin (UT-Austin)
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Lingxiao Jia
2015-08-25 16:27:57 UTC
Permalink
Thanks for your suggestions. I will dig into that and see if there is
something I can deal with it.
Post by Steve Reinhardt
Sorry! I read your email too quickly and missed that distinction.
I've never tried to call a function using the remote debugger. Your best
bet is to look at what's happening on the remote gdb interface to figure
out what's going wrong. Probably gem5 should just be reporting the page
fault back to gdb rather than panicking. I think there's a RemoteGDB debug
flag that could give you some clues.
Steve
Post by Lingxiao Jia
Hi Steve,
I know how to use gdb to debug, but now I want to remote debug the guest
code directly using gdb in SE mode, and I want to dump stats and create
checkpoints at breakpoints. However, this doesn't work and gem5 panics and
reports: page table fault when accessing virtual address 0... I don't
know if I can call function in remote debugging session. Thanks.
Post by Steve Reinhardt
You can call functions from gdb, but most functions are not designed to
be called from gdb. What arguments does the function expect, and what
arguments are you providing?
Post by Lingxiao Jia
Hi all,
Can anyone help with this issue? I am still not finding how to deal
with this.
Thanks.
Post by Lingxiao Jia
Hi all,
I am using gdb to remote debug program running on ARM architecture. I
am running in SE mode. When I try to dumpstat and checkpoint from the
remote debugger using call m5_xxx(), gem5 panics: page table fault when
accessing virtual address 0...
I included util/m5/m5op.h in my source file, and compiled with
m5op_arm.S statically.
The m5_xxx methods work fine if I directly call them in the program.
Can I really call function in remote debugging session?
--
Best regards,
Lingxiao Jia
--
Best regards,
Lingxiao Jia
莟凌霄
Electrical & Computer Engineering (ECE)
The University of Texas at Austin (UT-Austin)
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Best regards,
Lingxiao Jia
莟凌霄
Electrical & Computer Engineering (ECE)
The University of Texas at Austin (UT-Austin)
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
--
Best regards,

Lingxiao Jia

莟凌霄


Electrical & Computer Engineering (ECE)

The University of Texas at Austin (UT-Austin)
Continue reading on narkive:
Loading...