mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
From Craig Silverstein: Clean up DWARF line reader code.
This commit is contained in:
@ -630,7 +630,7 @@ Sized_dwarf_line_info<size, big_endian>::do_addr2line(unsigned int shndx,
|
|||||||
|
|
||||||
// If we found an exact match, great, otherwise find the last entry
|
// If we found an exact match, great, otherwise find the last entry
|
||||||
// before the passed-in offset.
|
// before the passed-in offset.
|
||||||
if (it->offset > offset)
|
if (it == offsets->end() || it->offset > offset)
|
||||||
{
|
{
|
||||||
if (it == offsets->begin())
|
if (it == offsets->begin())
|
||||||
return "";
|
return "";
|
||||||
@ -673,10 +673,6 @@ Sized_dwarf_line_info<size, big_endian>::do_addr2line(unsigned int shndx,
|
|||||||
|
|
||||||
// Dwarf_line_info routines.
|
// Dwarf_line_info routines.
|
||||||
|
|
||||||
// Note: this routine instantiates the appropriate
|
|
||||||
// Sized_dwarf_line_info templates for this config, so we don't have
|
|
||||||
// to have a separte instantiation section for them.
|
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
Dwarf_line_info::one_addr2line(Object* object,
|
Dwarf_line_info::one_addr2line(Object* object,
|
||||||
unsigned int shndx, off_t offset)
|
unsigned int shndx, off_t offset)
|
||||||
|
@ -72,16 +72,12 @@ class Dwarf_line_info
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<int size, bool big_endian>
|
template<int size, bool big_endian>
|
||||||
class Sized_dwarf_line_info
|
class Sized_dwarf_line_info : public Dwarf_line_info
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Initializes a .debug_line reader for a given object file.
|
// Initializes a .debug_line reader for a given object file.
|
||||||
Sized_dwarf_line_info(Object* object);
|
Sized_dwarf_line_info(Object* object);
|
||||||
|
|
||||||
std::string
|
|
||||||
addr2line(unsigned int shndx, off_t offset)
|
|
||||||
{ return do_addr2line(shndx, offset); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string
|
std::string
|
||||||
do_addr2line(unsigned int shndx, off_t offset);
|
do_addr2line(unsigned int shndx, off_t offset);
|
||||||
|
Reference in New Issue
Block a user