# Passing arguments to "Load DWARF" plugin

**URL:** <https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454>\
**Category:** Plugins\
**Tags:** idapython\
**Created:** [August 20, 2025, 3:53pm UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454 "2025-08-20T15:53:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![b3ntx](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@b3ntx](https://community.hex-rays.com/u/b3ntx)\
**Post date:** [August 20, 2025, 3:53pm UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454/1 "2025-08-20T15:53:52Z")

</div>

I’m working on a script that incorporates some DWARF debug information into an existing IDB. As part of this, I rely on the builtin DWARF plugin, however I can’t seem to find how to invoke this plugin with an argument - a path to an existing .dSYM - using IDAPython.

The most I have is `load_and_run_plugin(‘dwarf’, 0)`, but that just creates an open-file prompt. I’ve seen other plugins, like dscu, use netnode, but there’s hardly any documentation around it that I could find.

---

<div class="post-metadata">

**Author:** ![igor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/igor/32/35_2.png) [@igor](https://community.hex-rays.com/u/igor)\
**Post date:** [August 21, 2025, 10:57am UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454/2 "2025-08-21T10:57:05Z")

</div>

if your dSYM is next to the file or in a parallel directory to the .app bundle, normally it should be picked up automatically by the mach-O loader.

E.g. for `my.app/subdir/my2.app/subdir2/exec`, the plugin will check:

- `my.app/subdir/my2.app/subdir2/.dSYM/Contents/Resources/DWARF/exec`
- `my.app/subdir/my2.app/.dSYM/Contents/Resources/DWARF/exec`
- `my.app/subdir/.dSYM/Contents/Resources/DWARF/exec`
- `my.app/.dSYM/Contents/Resources/DWARF/exec`

You should see the paths being checked by passing `-z400010`to IDA.

---

<div class="post-metadata">

**Author:** ![b3ntx](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@b3ntx](https://community.hex-rays.com/u/b3ntx)\
**Post date:** [August 21, 2025, 12:48pm UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454/3 "2025-08-21T12:48:04Z")

</div>

Yeah that functions as it should, however my use case is a bit different. My plugin is creating and loading DWARF files into IDBs like the shared library cache.

Take Swift for example. It’s open source so I can build it myself and create a dSYM bundle containing all of the rich type information that Apple (and clang to a minor extent) strips from the shipped versions in the shared cache. I would like for my plugin to load those generated dSYM bundles programmatically instead of telling the user to manually go to a directory and Edit → Plugins → Load DWARF for each of the different dSYM bundles that the plugin generates. E.g. libswiftCore.dylib.dSYM, libswift\_Concurrency.dylib.dSYM, etc.

---

<div class="post-metadata">

**Author:** ![igor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/igor/32/35_2.png) [@igor](https://community.hex-rays.com/u/igor)\
**Post date:** [August 25, 2025, 10:34am UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454/4 "2025-08-25T10:34:04Z")

</div>

Thank you for the update. I’m afraid there is currently no option for this use case. Perhaps you can somehow intercept the `ui_ask_file` event and return your file name.

---

<div class="post-metadata">

**Author:** ![BlackBird](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/blackbird/32/247_2.png) [@BlackBird](https://community.hex-rays.com/u/BlackBird)\
**Post date:** [December 22, 2025, 12:43pm UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454/5 "2025-12-22T12:43:46Z")

</div>

So, how to load a dwarf file in idapython(via headless ida)?

---

<div class="post-metadata">

**Author:** ![BlackBird](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/blackbird/32/247_2.png) [@BlackBird](https://community.hex-rays.com/u/BlackBird)\
**Post date:** [December 22, 2025, 3:28pm UTC](https://community.hex-rays.com/t/passing-arguments-to-load-dwarf-plugin/454/6 "2025-12-22T15:28:05Z")

</div>

Well, I tried intercept `ida_kernwin.ask_file` api after calling `ida_kernwin.process_ui_actionEdit/Plugins/Load DWARF file“)` for running the DWARF plugin in `ida64`. It did work! But I want to decompile multi files in `idat`, there’s no `ui_action` or `ask_file`.

In a word, how to load specific dwarf file in `idat`?
