[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnserve -X doesn't really work

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2007-08-10 02:29:28 CEST

On 8/9/07, Dan Christian <dchristian@google.com> wrote:
> That was my second attempt, but gdb-6.6 doesn't seem to break at my breakpoints.
>
> gdb svnserve (inside emacs)
> (gdb) break main
> Breakpoint 1 at 0x804caca: file subversion/svnserve/main.c, line 304.
> (gdb) run --foreground -d -T --listen-host localhost -r
> /home/dchristian/local/svnrepo
> Starting program:
> /usr/local/google/dchristian/OpenSource/svn/subversion/svnserve
> --foreground -d -T --listen-host localhost -r
> /home/dchristian/local/svnrepo
> Failed to read a valid object file image from memory.
> [Thread debugging using libthread_db enabled]
> [New Thread -1209051456 (LWP 30461)]
> [Switching to Thread -1209051456 (LWP 30461)]
>
> Breakpoint 1, main (argc=8, argv=0xbffff574) at subversion/svnserve/main.c:304
> (gdb) break write
> Breakpoint 2 at 0x42c9c5a0
> (gdb) cont
> Continuing.
> [New Thread -1210766416 (LWP 30543)]
> [Thread -1210766416 (LWP 30543) exited]
> [New Thread -1210766416 (LWP 30549)]
> [Thread -1210766416 (LWP 30549) exited]
> [New Thread -1219159120 (LWP 30550)]
> [New Thread -1210766416 (LWP 30551)]
> [New Thread -1227764816 (LWP 30552)]
> [Thread -1210766416 (LWP 30551) exited]
> [Thread -1227764816 (LWP 30552) exited]
> [Thread -1219159120 (LWP 30550) exited]
>
> Meanwhile the svn import has finished successfully. It either never
> calls write (not likely) or gdb didn't manage to honor the breakpoint.
> In fact, I can't get it to break on 'write' even if I debug svn
> import NEW file://...

Hmm. Maybe try breaking on a svn function instead of a system call?

> It's been a while since I tried to debug threaded programs with gdb.
> I'm probably forgetting something basic. Maybe some kind of dynamic
> loading weirdness.

It's possible. I know I've debugged multithreaded svnserve processes
with gdb in the past. Are you building a dynamically linked binary or
a statically linked on? Statically linked often makes life easier for
gdb, in my experience (and we descend into the voodoo debugging where
you just try random crap until gdb behaves).

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 10 02:27:32 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.