Project

General

Profile

Actions

Feature #4069

closed

mdb should support embedded dmods in core dumps

Added by Robert Mustacchi about 10 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
mdb - modular debugger
Start date:
2013-08-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

When working with other pieces of software that want dmods there is a challenge of making sure that we always have the right version of the dmod to debug the resulting application. There is tension between shipping it in illumos, having the most recent version, and making sure that you have that around when you're debugging disparate versions. In these cases one solution is to have the dmod itself embedded in the library or executable that we care about in such a way that when the binary core dumps it will be in the dump. A simple solution to this is using elfwrap(1) to create a .o of the mdb so which can then be linked into the resulting application.

We construct a contract that if there is a symbol like mdb_<module>_start then mdb will notice it on startup and write it out to a temporary file and load it up. Similarly if someone issues a ::load we'll iterate over the symbol table of the target and use this same method. If a ::load is executed with the full path to a module, then this will be bypassed and the file will be loaded from the file system. Similarly if we fail to load it from the binary then it will be found in the program itself.

Actions #1

Updated by Robert Mustacchi over 3 years ago

  • Status changed from New to Closed

Due to the security issues that are inherent in this, we haven't implemented this at this time.

Actions

Also available in: Atom PDF