Re: How to debug xfree86 successfully

2005-11-04 Thread Marc Aurele La France

On Fri, 4 Nov 2005, cckuo wrote:


 I want to trace the behaviors of my video driver under Xfree86 and
have done the following steps which were collected from this mailing list.



1. prepare two machines; one is called host, and another is called target.
2. type "makeg World" under "xc" folder
3. telnet the target from host and run "gdb /usr/X11R6/bin/XFree86"
4. under the gdb command mode type "run :0"



Here my question comes from. I type "list" under gdb command mode.



I saw the source code of XFree86, main.c, but if I set the breakpoint
about the driver functions such as Probe, ScreenInit and EnterVT, which are
assigned to pScrn. The gdb told me that he cannot find the symbol file.



Are there some steps between 1-4 I made wrong or in fact I didn't build the
symbol file correctly?


The most straight-forward way of debugging an X server is to build it with 
...


#define DoLoadableServer NO

... in your xc/config/cf/host.def.  After a `make World`, this'll build 
everything into one binary.


Marc.

+--+---+
|  Marc Aurele La France   |  work:   1-780-492-9310   |
|  Academic Information and|  fax:1-780-492-1729   |
|Communications Technologies   |  email:  [EMAIL PROTECTED]  |
|  352 General Services Building   +---+
|  University of Alberta   |   |
|  Edmonton, Alberta   | Standard disclaimers apply|
|  T6G 2H1 |   |
|  CANADA  |   |
+--+---+
XFree86 developer and VP.  ATI driver and X server internals.
___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


How to debug xfree86 successfully

2005-11-03 Thread cckuo








Dear All:

  I want to trace the behaviors of my video
driver under Xfree86 and 

have done the following steps which were collected
from this mailing list.

 

1. prepare two machines; one is called host, and
another is called target.

2. type "makeg World" under "xc"
folder 

3. telnet the target from host and run "gdb
/usr/X11R6/bin/XFree86"

4. under the gdb command mode type "run :0"

 

Here my question comes from. I type "list"
under gdb command mode.

I saw the source code of XFree86, main.c, but if I set
the breakpoint 

about the driver functions such as Probe, ScreenInit
and EnterVT, which are 

assigned to pScrn. The gdb told me that he cannot find
the symbol file.

 

Are there some steps between 1-4 I made wrong or in
fact I didn't build the symbol 

file correctly? 

 

By the way, while manning gdb, I saw another way to
build remote-debug by 

using gdbserver.

Below are the steps excerpted from the document:

(here I use com1 for example)

1. target: #gdbserver /dev/ttyS0 exe-command argument 

2. host  : #gdb 

3. host  : #gdb> target remote /dev/ttyS0

Both sides are waiting for awhile, and then it say
"Ignoring packet error, continuing..."

ps:I have check the com1 port is well-functional.

 

Any suggestion will be appreciated.

 

Thanks a lot