diff options
author | Ulrich Drepper <[email protected]> | 2006-05-22 18:16:45 +0000 |
---|---|---|
committer | Ulrich Drepper <[email protected]> | 2006-05-22 18:16:45 +0000 |
commit | e7a73177dfbbc650fb43e5caa3ce29143f02fabd (patch) | |
tree | 86c12564092ffb764689fb12491ed0a5084b1ee4 /libdw/dwarf_getaranges.c | |
parent | 4f3d2a2aff351b2c202c8d6e7854a9e3a05153f2 (diff) |
Handle files without aranges information.
Diffstat (limited to 'libdw/dwarf_getaranges.c')
-rw-r--r-- | libdw/dwarf_getaranges.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libdw/dwarf_getaranges.c b/libdw/dwarf_getaranges.c index 61eb4f74..d2294ea3 100644 --- a/libdw/dwarf_getaranges.c +++ b/libdw/dwarf_getaranges.c @@ -1,5 +1,5 @@ /* Return list address ranges. - Copyright (C) 2000, 2001, 2002, 2004, 2005 Red Hat, Inc. + Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 2000. @@ -89,6 +89,15 @@ dwarf_getaranges (dbg, aranges, naranges) return 0; } + if (dbg->sectiondata[IDX_debug_aranges] == NULL) + { + /* No such section. */ + *aranges = NULL; + if (naranges != NULL) + *naranges = 0; + return 0; + } + if (dbg->sectiondata[IDX_debug_aranges]->d_buf == NULL) return -1; |