سؤال

Is there a way to ask GDB interface to print or list the code currently executing.

How can I do this (list code currently executing) via GDB?

هل كانت مفيدة؟

المحلول

Not sure if MI has command to list source (actually I'd bet it does not). What it has is -stack-info-frame, which will return information about source file, line, etc..

Once you have that information it's just open file, read appropriate line, etc.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top