tDon't insert a bogus <nil> into printed path. - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 88bb285e3d87ec2508840af33f7e0af53ec3c13c
(DIR) parent e3ffbf3b84dc0f303b3c94dcddb776eeb7b8c58e
(HTM) Author: wkj <devnull@localhost>
Date: Wed, 22 Jun 2005 04:05:14 +0000
Don't insert a bogus <nil> into printed path.
Diffstat:
M src/libmach/dwarfdump.c | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/src/libmach/dwarfdump.c b/src/libmach/dwarfdump.c
t@@ -81,6 +81,9 @@ main(int argc, char **argv)
if(s.attrs.have.lowpc){
if(dwarfpctoline(d, s.attrs.lowpc, &cdir, &dir, &file, &line, &mtime, &length) < 0)
print("\tcould not find source: %r\n");
+ else if(dir == nil)
+ print("\t%s/%s:%lud mtime=%lud length=%lud\n",
+ cdir, file, line, mtime, length);
else
print("\t%s/%s/%s:%lud mtime=%lud length=%lud\n",
cdir, dir, file, line, mtime, length);