Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9034873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:36:18+00:00 2026-06-16T08:36:18+00:00

From the GCC manual , there is the following overall option: -wrapper Invoke all

  • 0

From the GCC manual, there is the following overall option:

-wrapper
Invoke all subcommands under a wrapper program.
The name of the wrapper program and its parameters
are passed as a comma separated list.

gcc -c t.c -wrapper gdb,–args

This will invoke all subprograms of gcc under gdb --args', thus
the invocation of cc1 will be
gdb –args cc1 …’.

I’m having trouble understanding the example and the purpose of the flag.

gcc -c t.c will create a t.o.
and then what? the object file is sent to gdb?
or is gdb given the responsibility of creating the object file (asummingly adding debugging information)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T08:36:20+00:00Added an answer on June 16, 2026 at 8:36 am

    Yes, for debugging the compiler itself. Or otherwise “trace” what is going on in the compiler – you could for example print the arguments passed to cc1 itself by adding a program that does that and then runs cc1.

    gdb is not in charge of generating anything, it is just wrapping around cc1 whihc is the “compiler proper” – when you run gcc -c t.c the compiler first runs cpp -o t.i t.c to preprocess the t.c file. Then it runs cc1 -o t.s t.i and finally as -o t.o t.s (or something along those lines. With the wrapper, it would run those commands as, for example, gdb --args cc1 -o t.s t.i.

    Edit: This is of course much simplified compared to a “real” compile – there’s a whole bunch of arguments passed to cc1, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All the GNU gcov manual online at http://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov says about gcov -f option is:
Is there anyway to get compile-time typeid information from GCC with RTTI disabled? Under
The following GCC inline asm is taken from LuaJit's coco library. Can someone provide
I have the following string from which I want to extract gcc-4.3.2 and C
I recently decided to switch to clang from gcc and I’m getting the following
Possible Duplicate: Why does gcc have “â” in all its error messages? New to
How can I suppress following warning from gcc linker: warning: the use of 'mktemp'
Hello Developers! I am learning algorithms from Algorithms Design Manual Book by Skiena. There
Are there any programs which can be used to visualize error messages from gcc.
I was wondering if there is any way to gather statistics from GCC/G++ compilation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.