Re: trouble using gdb

From: Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Date: Fri Dec 29 2000 - 10:31:22 PST

  • Next message: Henning Meier-Geinitz: "Re: trouble using gdb"

    stef wrote:
    >
    > Hello,
    > I am trying to write a sane backend for my scanner, and I just can't debug
    > it with gdb. When I set a breakpoint in my buggy function, the stack seems ok,
    > but I can't access local variables. Parameters are available. I forced static
    > build of scanimage by adding '-all-static' to libtool in the Makefile.
    > Here's a sample of what I get when debugging scanimage:
    >
    > Breakpoint 2, sane_get_parameters (h=0x806b568, parms=0xbfff73d4) at dll-s.c:40
    > 40 return ENTRY(get_parameters) (h, parms);
    > (gdb) s
    > sane_dll_get_parameters (handle=0x806b568, params=0xbfff73d4) at dll.c:820
    > 820 DBG(3, "get_parameters(handle=%p,params=%p)\n", handle, params);

    Hi Stef,

    I think you expected that the breakpoint was set in your program and not
    in sane_dll_*

    All backends use the same function names sane_open, sane_start, ...
    so the function names for backends are renamed and you get the only one
    with the name sane_get_parameters that is visible from the frontend
    and that are the functions from sane_dll.

    Ther are two possibilities:
    1) do not use sane-dll, link the frontend (scanimage) directly against your backend
    2) define the breakpoint with sourcode:linenumber. May be you can find out the function
    names of your backend but I don`t know how this is generated.

    Bye
    Oliver

    -- 
    Homepage:	http://www.wolfsburg.de/~rauch
    sane-umax:	http://www.wolfsburg.de/~rauch/sane/sane-umax.html
    xsane:		http://www.wolfsburg.de/~rauch/sane/sane-xsane.html
    E-Mail:		mailto:Oliver.Rauch@Wolfsburg.DE
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Fri Dec 29 2000 - 11:22:07 PST