diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-12 15:35:07 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-12 15:35:07 +0000 |
commit | e57215bf51b99836a766f497a405760e8026d2ec (patch) | |
tree | d4957b35227996816952c95896f25fa836800001 | |
parent | b1f8bbf4f7fca70b3a173932f2f3c9cfed07b075 (diff) |
* addr2line.c (get_nth_dirname): decrement the directory index
because the index specifies the index of given included_directories
which is separated by NUL and its index is begun from 1.
Note that 0 specifies the current directory of the compilation.
see also http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | addr2line.c | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,11 @@ +Thu Jan 13 00:32:54 2011 NARUSE, Yui <naruse@ruby-lang.org> + + * addr2line.c (get_nth_dirname): decrement the directory index + because the index specifies the index of given included_directories + which is separated by NUL and its index is begun from 1. + Note that 0 specifies the current directory of the compilation. + see also http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf + Thu Jan 13 00:06:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> * io.c (rb_f_syscall): Add warning messages. [ruby-core:34062] diff --git a/addr2line.c b/addr2line.c index 605c6f60d3..91b4be99ab 100644 --- a/addr2line.c +++ b/addr2line.c @@ -121,7 +121,7 @@ get_nth_dirname(int dir, char *p) if (!dir--) { return ""; } - while (dir) { + while (dir--) { while (*p) p++; p++; if (!*p) { |