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 6864765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:57:12+00:00 2026-05-27T02:57:12+00:00

I as using the bt command to view the stacktrace. The output is (gdb)

  • 0

I as using the bt command to view the stacktrace. The output is

(gdb) bt
#0  0x001ae4cd in Debugger (message=0x1 "???\a") at /SourceCache/xnu/xnu-1228.7.58/osfmk/i386/AT386/model_dep.c:705
#1  0x3bf97000 in ?? ()
#2  0x0012b0fa in panic (str=0x5ef "") at /SourceCache/xnu/xnu-1228.7.58/osfmk/kern/debug.c:274
#3  0x001a8cd4 in kernel_trap (state=0x51a67c80) at /SourceCache/xnu/xnu-1228.7.58/osfmk/i386/trap.c:680
#4  0x0019ede5 in return_from_trap () at pmap.h:176
#5  0x00132bea in __doprnt (fmt=<value temporarily unavailable, due to optimizations>, argp=0x51a67e6c, putc=0x38ad24 <kvprintf+33>, arg=0x51a67e48, radix=10) at /SourceCache/xnu/xnu-1228.7.58/osfmk/kern/printf.c:439
#6  0x0038ad11 in kvprintf (fmt=0x1 "???\a", func=0x1, arg=0x1, radix=1, ap=0x51a67e84 "\\?\034I\"") at /SourceCache/xnu/xnu-1228.7.58/bsd/kern/subr_prf.c:525
#7  0x491b5dac in com_my_drv_Log (format=0x491cbff8 "%s::%s:%n\n") at Logger.cpp:37
#8  0x491b3d36 in MyDrv::init (this=0x5c1f200, properties=0x58a8040) at MyDrv.cpp:34
#9  0x00412887 in IOService::probeCandidates (this=0x599a980, matches=0x58ade80) at /SourceCache/xnu/xnu-1228.7.58/iokit/Kernel/IOService.cpp:2512
#10 0x004124ab in IOService::doServiceMatch (this=0x534180, options=8) at /SourceCache/xnu/xnu-1228.7.58/iokit/Kernel/IOService.cpp:2921
#11 0x00411127 in _IOConfigThread::main (self=0x58c6790) at /SourceCache/xnu/xnu-1228.7.58/iokit/Kernel/IOService.cpp:3125
(gdb) 

In frame

#7  0x491b5dac in com_my_drv_Log

how could I view the parameters passed to my com_my_drv_Log with signature

void com_my_drv_Log (const char* format, ...);
/* with the variable argument list */

?

  • 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-05-27T02:57:13+00:00Added an answer on May 27, 2026 at 2:57 am

    Looks like this is possible to do it for a simple program like this:

    #include <stdarg.h>
    #include <stdio.h>
    
    void myfunc(const char *fmt, ...)
    {
            va_list args;
            va_start(args, fmt);
            vprintf(fmt, args);
            va_end(args);
            return;
    }
    
    int main(int argc, char *argv[])
    {
            myfunc("test 1: %s %s\n", "one", "two");
            myfunc("test 2: %s %d %c\n", "apple", 222, 'y');
            return 0;
    }
    

    Here is sample gdb session:

    $ gdb testprog
    GNU gdb (GDB) 7.1-debian
    [snip]
    Reading symbols from /home/user/testprog...done.
    (gdb) break myfunc
    Breakpoint 1 at 0x400552: file testprog.c, line 7.
    (gdb) run
    Starting program: /home/user/testprog
    
    Breakpoint 1, myfunc (fmt=0x4006f4 "test 1: %s %s\n") at testprog.c:7
    7               va_start(args, fmt);
    (gdb) # initialize args to hold correct values:
    (gdb) step
    8               vprintf(fmt, args);
    (gdb) # print first argument in "..." list which we know is a char*:
    (gdb) p *(char **)(((char *)args[0].reg_save_area)+args[0].gp_offset)
    $1 = 0x4006f0 "one"
    

    I have not tested all of this, look this link for full solution. This blog will be useful also.

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

Sidebar

Related Questions

Question: How do send data to a view model when using command binding? So
I want to show a specific view in my RCP application using a command.
How to create a view using the clearcase command mode? How to create it?
I would like to know how to view special characters while using 'less' command.
I'm trying to connect from one server to another using FTP. By using command
In Delphi 2009, how can I build a project using command line. I tried
Using sc command we can query, start , stop windows services. For ex: sc
Using the command: CREATE TABLE IF NOT EXISTS `test`.`t1` ( `col` VARCHAR(16) NOT NULL
I am using this command: cut -d: -f2 To sort and reedit text, Is
I'm using the command line compiler for builds. One problem I see is that

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.