(04-09-2011, 09:42 AM)gregory Wrote: [ -> ]tuxgamer replace the last next with a step too. Next = execute 1 line. Step = execute 1 instruction. A function contains several instruction. If you use next, you will execute all instructions of the function in one go. If you use step you can execute each instruction of the function.
In linux it uses svn tools. I do not remember if it must work or not. I will give it a look.
For libstd++, it is the gcc 4.6 versions...
Edit: sorry I cannot downgrade it to gcc 4.5
Thanks for the reply.
abaout downgrade gcc 4.5, that's fine,
Okay, here is the result:
1.setup
Code:
[ai@Mandriva_2010_Spring bin]$ gdb pcsx2-dbg
GNU gdb (GDB) 7.1-1mdv2010.1 (Mandriva Linux release 2010.1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mandriva-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ai/Game/pcsx2-svn/bin/pcsx2-dbg...done.
(gdb) run
Starting program: /home/ai/Game/pcsx2-svn/bin/pcsx2-dbg
[Thread debugging using libthread_db enabled]
Interface is initializing. Entering Pcsx2App::OnInit!
Applying operating system default language...
Detaching after fork from child process 11628.
Detaching after fork from child process 11629.
Detaching after fork from child process 11630.
Command line parsing...
Command line parsed!
[New Thread 0xb6077b70 (LWP 11631)]
Detaching after fork from child process 11632.
[New Thread 0xb5622b70 (LWP 11633)]
[Thread 0xb5622b70 (LWP 11633) exited]
^C
Program received signal SIGINT, Interrupt.
0xffffe424 in __kernel_vsyscall ()
Missing debug package(s), you should install: SDL12-debug-1.2.14-3mdv2010.2.i586 aalib-debug-1.4.0-0.rc5.19mdv2010.1.i586 atk1.0-debug-1.30.0-1mdv2010.1.i586 cairo-debug-1.9.14-0.2mdv2010.1.i586 directfb-debug-1.4.3-2mdv2010.1.i586 fontconfig-debug-2.8.0-2mdv2010.1.i586 freetype2-debug-2.3.12-1.5mdv2010.1.i586 gcc-debug-4.4.3-2mnb2.i586 glib2.0-debug-2.24.1-1mdv2010.1.i586 glibc-debug-2.11.1-8.2mnb2.i586 gtk+2.0-debug-2.20.1-1mdv2010.1.i586 ia_ora-gnome-debug-1.0.24-1mdv2010.1.i586 jbigkit-debug-2.0-4mdv2010.1.i586 libart_lgpl-debug-2.3.21-1mdv2010.1.i586 libcanberra-debug-0.24-2mdv2010.1.i586 libggi-debug-2.2.2-14mdv2010.1.i586 libgii-debug-1.0.2-13mdv2010.1.i586 libgnomecanvas-debug-2.30.1-1mdv2010.1.i586 libgnomeprint-debug-2.18.7-1mdv2010.1.i586 libgnomeprintui-debug-2.18.5-1mdv2010.1.i586 libice-debug-1.0.6-2mdv2010.1.i586 libjpeg-debug-8a-1mdv2010.1.i586 libogg-debug-1.2.0-1mdv2010.1.i586 libpng-debug-1.2.43-1.1mdv2010.1.i586 libsm-debug-1.1.1-2mdv2010.1.i586 libtiff-debug-3.9.2-2.2mdv2010.1.i586 libtool-debug-2.2.6b-2mdv2010.1.i586 libvorbis-debug-1.3.1-1mdv2010.1.i586 libx11-debug-1.3.3-1mdv2010.1.i586 libxau-debug-1.0.5-2mdv2010.1.i586 libxcb-debug-1.6-1mdv2010.1.i586 libxcomposite-debug-0.4.1-1mdv2010.1.i586 libxcursor-debug-1.1.10-2mdv2010.1.i586 libxdamage-debug-1.1.2-1mdv2010.1.i586 libxdmcp-debug-1.0.3-2mdv2010.1.i586 libxext-debug-1.1.1-2mdv2010.1.i586 libxfixes-debug-4.0.4-1mdv2010.1.i586 libxi-debug-1.3-1mdv2010.1.i586 libxinerama-debug-1.1-1mdv2010.1.i586 libxml2-debug-2.7.7-1.1mdv2010.1.i586 libxrandr-debug-1.3.0-3mdv2010.1.i586 libxrender-debug-0.9.5-2mdv2010.1.i586 libxxf86dga-debug-1.1.1-1mdv2010.1.i586 libxxf86vm-debug-1.1.0-1mdv2010.1.i586 ncurses-debug-5.7-4.20091227.1mdv2010.1.i586 pango-debug-1.28.0-1mdv2010.1.i586 pcre-debug-8.02-1mdv2010.1.i586 pixman-debug-0.18.2-1mdv2010.1.i586 slang-debug-2.2.2-1mdv2010.1.i586 tdb-debug-1.2.1-1mdv2010.1.i586 zlib-debug-1.2.3-15mdv2010.1.i586
(gdb) break SDL_video.c:1112
Breakpoint 1 at 0xb4733e66: file /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c, line 1112.
(gdb) break SDL_VideoInit
Breakpoint 2 at 0xb473280a: file /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c, line 419.
(gdb)
2.Boot the CD
Code:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/ai/Game/pcsx2-svn/bin/pcsx2-dbg
[Thread debugging using libthread_db enabled]
Interface is initializing. Entering Pcsx2App::OnInit!
Applying operating system default language...
Detaching after fork from child process 14495.
Detaching after fork from child process 14496.
Detaching after fork from child process 14497.
Command line parsing...
Command line parsed!
[New Thread 0xb6077b70 (LWP 14498)]
Detaching after fork from child process 14499.
[New Thread 0xb5622b70 (LWP 14500)]
[Thread 0xb5622b70 (LWP 14500) exited]
[New Thread 0xb5622b70 (LWP 14506)]
[New Thread 0xaa02bb70 (LWP 14507)]
[Switching to Thread 0xaa02bb70 (LWP 14507)]
Breakpoint 1, SDL_CreateWindow (title=0xa91ded4 "PCSX2", x=100, y=100, w=640, h=480, flags=38)
at /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c:1112
1112 if (!_this) {
Missing debug package(s), you should install: dbus-debug-1.2.24-1mdv2010.1.i586 expat-debug-2.0.1-12mdv2010.1.i586 gvfs-debug-1.6.1-2mdv2010.1.i586 udev-debug-153-5mnb2.i586
(gdb)
3.Press Ctrl-x A, then typing command "step"
# I got source /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c
# and it's point to line 1114 if (SDL_VideoInit(NULL) < 0) {
4.typing command "step"
# I got source /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c
# i got highlighted line point to line 1123 if (flags & SDL_WINDOW_OPENGL) {
# I got non highlighted line point to line 1125 SDL_SetError("No OpenGL support in video driver");
5.typing command "step"
# I got source /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c
# i got highlighted line point to line 1124 if (!_this->GL_CreateContext) {
# I got non highlighted line point to line 1125 SDL_SetError("No OpenGL support in video driver");
6.typing command "step"
# I got info:
Code:
(gdb) step
Program received signal SIGSEGV, Segmentation fault.
0xb4733e98 in SDL_CreateWindow (title=0xa1fed4c "PCSX2", x=100, y=100, w=640, h=480, flags=38)
at /home/ai/Game/pcsx2-svn/3rdparty/SDL-1.3.0-5387/src/video/SDL_video.c:1124
7.typing command "print _this"
# I got info:
Code:
(gdb) print _this
$1 = (SDL_VideoDevice *) 0x0
8.typing command "step"
# I got info
Code:
(gdb) step
SysPageFaultSignalFilter (signal=11, siginfo=0xaa02ab7c) at /home/ai/Game/pcsx2-svn/common/src/Utilities/Linux/LnxHostSys.cpp:32
# I got source /home/ai/Game/pcsx2-svn/common/src/Utilities/Linux/LnxHostSys.cpp
# and the highlithed line point to line 32 {
9.typing command "step"
# I got source /home/ai/Game/pcsx2-svn/common/src/Utilities/Linux/LnxHostSys.cpp
# and the highlithed line point to line 49 Source_PageFault->Dispatch( PageFaultInfo( (uptr)siginfo->si_addr & ~m_pagemask ) );
10.typing command "step"
# I got info :
Code:
(gdb) step
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0831dd35 in PageFaultInfo::PageFaultInfo (this=0xaa02ab40, address=0) at /home/ai/Game/pcsx2-svn/common/include/Utilities/PageFaultSource.h:33
# I got source /home/ai/Game/pcsx2-svn/common/include/Utilities/PageFaultSource.h
# and the highlithed line point to line 33 PageFaultInfo( uptr address )
Because i don't see any SDL things, i quit from here.