Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > Linux
|
Linux General discussion of programming the various flavors of Linux operating systems.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Linux section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 4th, 2011, 10:10 AM
Registered User
 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question How to debug without re-compile?

Dear Friend:
I am a chinese boy. My English is very poor.
<< Begbinning Linux Programming 3rd Edition >>
I have a question about debug when I read the 10th Chap. (10.2.4)

What's meaning of debug without re-compilation? (gcc -d) ????
I have read the gcc help doc.

-dletters information


-dA Annotate the assembler output with miscellaneous debugging
information.

-dD Dump all macro definitions, at the end of preprocessing, in
addition to normal output.

-dH Produce a core dump whenever an error occurs.

-dm Print statistics on memory usage, at the end of the run, to
standard error.

-dp Annotate the assembler output with a comment indicating which
pattern and alternative was used. The length of each
instruction is also printed.

-dP Dump the RTL in the assembler output as a comment before each
instruction. Also turns on -dp annotation.

-dv For each of the other indicated dump files (-fdump-rtl-pass),
dump a representation of the control flow graph suitable for
viewing with VCG to file.pass.vcg.

-dx Just generate RTL for a function instead of compiling it.
Usually used with -fdump-rtl-expand.

-dy Dump debugging information during parsing, to standard error.

Here is a part of example code copied from the Page 361

if( debug ) {
sprintf(msg, ... );
write_debug(msg);
}


I don't know how to make the above code work when after generate an application.

Can you give an example code ? Please Teach me step by step. Thanks for your help.

Edisonewtong





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone help me debug ? bryman BOOK: Beginning iPad Application Development 1 October 3rd, 2010 07:21 AM
Help Debug arholly Access VBA 19 December 18th, 2006 01:52 PM
Service debug ahmedfathey .NET Web Services 0 March 31st, 2005 02:30 PM
Can't debug sithlrd General .NET 9 July 28th, 2004 05:00 PM
Can't Debug shmacgregor General .NET 6 March 1st, 2004 05:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.