Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEugene Tarassov2012-01-03 20:41:44 -0500
committerEugene Tarassov2012-01-03 20:41:44 -0500
commit81a2235dc6878a7b333e95b47a4bd94d189379d7 (patch)
treecf3332f644769c132d0ba655bb83a535aa73e4b7 /tests
parent9bc4607e5cc58fed2ed22b65a1ad66bcf5eed358 (diff)
downloadorg.eclipse.tcf.agent-81a2235dc6878a7b333e95b47a4bd94d189379d7.tar.gz
org.eclipse.tcf.agent-81a2235dc6878a7b333e95b47a4bd94d189379d7.tar.xz
org.eclipse.tcf.agent-81a2235dc6878a7b333e95b47a4bd94d189379d7.zip
TCF Agent: fixed handling of column numbers in DWARF line info.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dwarf/tcf/backend/backend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-dwarf/tcf/backend/backend.c b/tests/test-dwarf/tcf/backend/backend.c
index d42c3e58..d8a20adc 100644
--- a/tests/test-dwarf/tcf/backend/backend.c
+++ b/tests/test-dwarf/tcf/backend/backend.c
@@ -282,7 +282,8 @@ static void addr_to_line_callback(CodeArea * area, void * args) {
static void line_to_addr_callback(CodeArea * area, void * args) {
CodeArea * org = (CodeArea *)args;
- if (area->start_line > org->start_line || area->end_line <= org->start_line) {
+ if (area->start_line > org->start_line || (area->start_line == org->start_line && area->start_column > org->start_column) ||
+ area->end_line < org->start_line || (area->end_line == org->start_line && area->end_column <= org->start_column)) {
errno = set_errno(ERR_OTHER, "Invalid line area line numbers");
error("line_to_address");
}
@@ -605,12 +606,11 @@ static void next_pc(void) {
error("address_to_line");
}
else if (area.start_line > 0) {
- char elf_file_name[0x1000];
+ char * elf_file_name = tmp_strdup(area.file);
if (area.start_address > pc || area.end_address <= pc) {
errno = set_errno(ERR_OTHER, "Invalid line area address");
error("address_to_line");
}
- strlcpy(elf_file_name, area.file, sizeof(elf_file_name));
if (line_to_address(elf_ctx, elf_file_name, area.start_line, area.start_column, line_to_addr_callback, &area) < 0) {
error("line_to_address");
}

Back to the top