.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * genelf_debug.c |
---|
3 | 4 | * Copyright (C) 2015, Google, Inc |
---|
4 | 5 | * |
---|
5 | 6 | * Contributed by: |
---|
6 | 7 | * Stephane Eranian <eranian@google.com> |
---|
7 | | - * |
---|
8 | | - * Released under the GPL v2. |
---|
9 | 8 | * |
---|
10 | 9 | * based on GPLv2 source code from Oprofile |
---|
11 | 10 | * @remark Copyright 2007 OProfile authors |
---|
.. | .. |
---|
25 | 24 | #include <err.h> |
---|
26 | 25 | #include <dwarf.h> |
---|
27 | 26 | |
---|
28 | | -#include "perf.h" |
---|
29 | 27 | #include "genelf.h" |
---|
30 | 28 | #include "../util/jitdump.h" |
---|
31 | 29 | |
---|
.. | .. |
---|
344 | 342 | */ |
---|
345 | 343 | |
---|
346 | 344 | /* start state of the state machine we take care of */ |
---|
347 | | - unsigned long last_vma = code_addr; |
---|
| 345 | + unsigned long last_vma = 0; |
---|
348 | 346 | char const *cur_filename = NULL; |
---|
349 | 347 | unsigned long cur_file_idx = 0; |
---|
350 | 348 | int last_line = 1; |
---|
.. | .. |
---|
475 | 473 | ent = debug_entry_next(ent); |
---|
476 | 474 | } |
---|
477 | 475 | add_compilation_unit(di, buffer_ext_size(dl)); |
---|
478 | | - add_debug_line(dl, debug, nr_debug_entries, 0); |
---|
| 476 | + add_debug_line(dl, debug, nr_debug_entries, GEN_ELF_TEXT_OFFSET); |
---|
479 | 477 | add_debug_abbrev(da); |
---|
480 | 478 | if (0) buffer_ext_dump(da, "abbrev"); |
---|
481 | 479 | |
---|