gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using gpsd-dbg


From: Fred Wright
Subject: Re: Using gpsd-dbg
Date: Tue, 14 Sep 2021 13:05:25 -0700 (PDT)
User-agent: Alpine 2.23 (OSX 453 2020-06-18)


On Tue, 14 Sep 2021, Gary E. Miller wrote:
On Tue, 14 Sep 2021 19:28:45 +0000
Jared Hagel <jared.hagel@vontas.com> wrote:

Thanks Gary. I am building from source. Turning on debugging before
building sounds like the better option to me. I'll do that - after I
figure out how 😊. I'm sure it won't be hard to find.

Assuming you are using gcc, just build with CFLAGS="-ggdb"

Actually, the best way is just to specify debug=yes on the scons command line, which includes debug information in both compiling and linking, and also turns off optimizations, since gdb and lldb don't tend to handle optimized code as well as their documentation suggests. If you really need to debug optimized code (e.g., because the code behaves differently when optimized), you can use debug_opt=yes instead, but then you should be prepared to see a somewhat distorted view of the program's state through the debugger. In that case, sometimes it's necessary to look at the assembler code to see what's really going on.

Fred Wright

reply via email to

[Prev in Thread] Current Thread [Next in Thread]