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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:36:45+00:00 2026-05-22T02:36:45+00:00

Is there a command in gdb that I can use to (re)load / refresh

  • 0

Is there a command in gdb that I can use to (re)load / “refresh” source files? (As far as I can see, gdb works only with source directories, according to Debugging with GDB: Source – and there is no specific command to “refresh”)

Background about my problem:

I use a virtual machine with a debug kernel, so I can connect to a local instance of gdb, and can debug kernel modules. The modules are compiled with debug info on, and this specifies folders where the source of the modules is kept (Instruct GDB 6.5 to use source embedded in object file – Stack Overflow). I have the source directories in the same path(s) in both VM and local machine.

The problem is this – I need to do quite a bit of steps in order to get the module to segfault – and the remote gdb to go into the stack. Then I do a backtrace, and I can see the source files referenced, i.e.

#0  0xc0132a13 in ?? ()
#1  0xc056e551 in ?? ()
#2  0xc056e506 in ?? ()
#3  0xd8be53f3 in mymodule_func1 (var1=0xd79f9b44, var2=0x0, var3=825269148)
    at /media/src/mymodule.h:954
#4  0xd8be53d0 in mymodule_func2 (data=3617561412)
    at /media/src/mymodule.h:936
#5  0xc014fe87 in ?? ()
#6  0xc0151478 in ?? ()

Then I try to do say, list /media/src/mymodule.h:954 – and I realize that I have changed stuff on the local version of mymodule.h file!!

So I undo the changes – but unfortunately, GDB does not see these changes! And, of course, I don’t want to restart GDB – because that means I have to restart the VM, and go through the entire procedure in order to get the kernel module to segfault again 🙁 !!

Then I try to do something like this:

(gdb) show symbol-reloading
Dynamic symbol table reloading multiple times in one run is off.
(gdb) set symbol-reloading on
(gdb) add-symbol-file ~/mymodule.o 0xd8be4000
add symbol table from file "/media/src/mymodule.o" at
    .text_addr = 0xd8be4000
(y or n) y
Reading symbols from /media/src/mymodule.o...done.

… in hope that it will somehow “reload” the source files – but unfortunately, list /media/src/mymodule.h:954 shows that it doesn’t, nothing is changed – even though gdb does recognize that something has changed, as in warning: Source file is more recent than executable.… (so, for the time being, I have to restart entire VM and gdb as well 🙁 🙁 )

  • 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-22T02:36:45+00:00Added an answer on May 22, 2026 at 2:36 am

    Resetting the directory list using the directory command appears to have the desired effect.

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

Sidebar

Related Questions

Is there any command i can use in activity class that disables TextViews that
Is there a command I can run inside my SQL script so that it
Is there a command that can append one array of char onto another? Something
How can I set Emacs gdb so that it shows the most recent command
Is there a way that I can script the initialization file for GDB so
Is there command to use on windows from java to make the computer sleep?
Is there any command available for generating all missing spec files for existing models
Is there a command in R that will allow you to write a CSV
Is there a command in MATLAB that allows me to find all NaN (Not-a-Number)
Is there a command-line tool that could tell me if Gzip is on? What

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.