self.line_free = line_number('main.c', '// free line')
self.line_breakpoint = line_number('main.c', '// break line')
self.line_crash = line_number('main.c', '// BOOM line')
+ self.col_crash = 16
def asan_tests(self):
exe = self.getBuildArtifact("a.out")
lldb.eStopReasonInstrumentation)
self.expect("bt", "The backtrace should show the crashing line",
- substrs=['main.c:%d' % self.line_crash])
+ substrs=['main.c:%d:%d' % (self.line_crash, self.col_crash)])
self.expect(
"thread info -s",
"${module.file.basename}{`${function.name-without-args}" \
"{${frame.no-debug}${function.pc-offset}}}}"
-#define FILE_AND_LINE "{ at ${line.file.basename}:${line.number}}"
+#define FILE_AND_LINE \
+ "{ at ${line.file.basename}:${line.number}{:${line.column}}}"
#define IS_OPTIMIZED "{${function.is-optimized} [opt]}"
#define DEFAULT_THREAD_FORMAT \
static FormatEntity::Entry::Definition g_line_child_entries[] = {
ENTRY_CHILDREN("file", LineEntryFile, None, g_file_child_entries),
ENTRY("number", LineEntryLineNumber, UInt32),
+ ENTRY("column", LineEntryColumn, UInt32),
ENTRY("start-addr", LineEntryStartAddress, UInt64),
ENTRY("end-addr", LineEntryEndAddress, UInt64),
};
ENUM_TO_CSTR(FunctionIsOptimized);
ENUM_TO_CSTR(LineEntryFile);
ENUM_TO_CSTR(LineEntryLineNumber);
+ ENUM_TO_CSTR(LineEntryColumn);
ENUM_TO_CSTR(LineEntryStartAddress);
ENUM_TO_CSTR(LineEntryEndAddress);
ENUM_TO_CSTR(CurrentPCArrow);
}
return false;
+ case Entry::Type::LineEntryColumn:
+ if (sc && sc->line_entry.IsValid() && sc->line_entry.column) {
+ const char *format = "%" PRIu32;
+ if (!entry.printf_format.empty())
+ format = entry.printf_format.c_str();
+ s.Printf(format, sc->line_entry.column);
+ return true;
+ }
+ return false;
+
case Entry::Type::LineEntryStartAddress:
case Entry::Type::LineEntryEndAddress:
if (sc && sc->line_entry.range.GetBaseAddress().IsValid()) {