How to print exception stack trace of Objective-C exceptions with GNU runtime and without GNUStep?

I have an Objective-C app build on Linux with GCC 4.3 using no specific framework (only GNU-runtime). I am using Objective-C exceptions (via the '-fobjc-exceptions' compiler flag).

Now I want to print the stack trace of such an exception when I caught some. Or what would make me even happier: put the trace in a string or some kind of structure to evaluate or print it later on.

How can that be achieved?


NSArray * stack = [NSThread callStackSymbols];

It may help.


Since no more knowledge is floating in, here is what I found out by myself:

At least under Linux I can use the GNU extensions backtrace and backtrace_symbols to get addresses of the call stack and the corresponding symbols. This helps a little but is far away from the information that gdb gives. There are neither line numbers nor arguments values.

With the glibc extension dladdr I can get similar information but not further.

This is still not exactly what I'm looking for but no one got so clause – so I would accept my own answer :(.


  • rewrite url when a form is submitted
  • How should an app react when indexedDB is blocked
  • Xpath problem, getting the id(attribute) of a element, if you know the title of the element
  • Qt — pass events to multiple objects?
  • How to use a decaying learning rate with an estimator in tensorflow?
  • Thrift: Is it possible to do only serialization with the C (GLib) Thrift library?
  • how to translate xml using xslt with complex rules
  • Can I call custom javascript from an R jupyter notebook
  • Group variable in cobol
  • 'include' of functions in groovy scripts
  • unrecognized selector isPitched called
  • maven jboss-as:start A required class was missing … org/sonaty…/ArtifactResolutionException
  • Is there a way to call library thread-local init/cleanup on thread creation/destruction?
  • How do I add a File Type Association in a Windows Phone 8.1 app manifest?
  • What is this iOS exception with NSCFType?
  • You tube videos are not playing
  • Delphi: Where is the shortcut that started the application? [duplicate]
  • Where these are stored?
  • NHibernate manually control fetching
  • Sensibility of combined Maven/Ant+Ivy build management for dual platform Desktop/Android deployment?
  • Bootstrap (v3.3.4) glyphicons not displayed in IE when refresh page (F5)
  • Python delete lines of text line #1 till regex
  • Is there some graphical way to create my own configuration file on SonarLint?
  • Pycharm: Marking a folder as 'sources root' is not recursive for subfolders
  • Graphics.CopyFromScreen [Web application] + The handle is invalid
  • How do I access an unhandled exception in an MVC Error view?
  • Display images in Django
  • Problem deserializing objects from cache on MyBatis 3/Java
  • Yii2: Config params vs. const/define
  • Ajax Loaded meta Tags
  • javascript inside java/jsp code
  • align graphs with different xlab
  • Return words with double consecutive letters
  • Android Studio and gradle
  • KeystoneJS: Relationships in Admin UI not updating
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • Reading document lines to the user (python)
  • How can i traverse a binary tree from right to left in java?
  • Unable to use reactive element in my shiny app
  • Python/Django TangoWithDjango Models and Databases