[haiku-commits] haiku: hrev52619 - src/add-ons/kernel/debugger/demangle

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 2 Dec 2018 16:35:12 -0500 (EST)

hrev52619 adds 1 changeset to branch 'master'
old head: c9e6afb2afc6769746817291c2480c69a9b0271a
new head: 4bba0571c6092ea9de8fc365ee70fb2d3d16416a
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=4bba0571c609+%5Ec9e6afb2afc6

----------------------------------------------------------------------------

4bba0571c609: demangler/gcc3+: when the parameter isn't found, return a useful 
error.
  
  after the last argument, get_next_argument() would call 
get_next_argument_gcc3(),
  see a failure, then call get_next_argument_gcc2(). Ideally we could make
  different cookies for gcc2 and gcc3+ demanglers, thus avoiding this issue.
  
  Change-Id: I3904e008a0b6ba627940fb9bca1d44ddbafbcbd0
  Reviewed-on: https://review.haiku-os.org/742
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52619
Commit:      4bba0571c6092ea9de8fc365ee70fb2d3d16416a
URL:         https://git.haiku-os.org/haiku/commit/?id=4bba0571c609
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Sat Dec  1 15:24:37 2018 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun Dec  2 21:35:09 2018 UTC

----------------------------------------------------------------------------

2 files changed, 4 insertions(+), 2 deletions(-)
src/add-ons/kernel/debugger/demangle/demangle.cpp | 4 ++--
src/add-ons/kernel/debugger/demangle/gcc3+.cpp    | 2 ++

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/debugger/demangle/demangle.cpp 
b/src/add-ons/kernel/debugger/demangle/demangle.cpp
index 60c3626176..f6e0584bb4 100644
--- a/src/add-ons/kernel/debugger/demangle/demangle.cpp
+++ b/src/add-ons/kernel/debugger/demangle/demangle.cpp
@@ -46,8 +46,8 @@ get_next_argument(uint32* _cookie, const char* mangledName, 
char* name,
        if (looks_like_gcc3_symbol(mangledName)) {
                status_t error = get_next_argument_gcc3(_cookie, mangledName, 
name,
                        nameSize, _type, _argumentLength);
-               if (error == B_OK)
-                       return B_OK;
+               if (error == B_OK || error == B_BAD_INDEX)
+                       return error;
        }
 
        // fallback is gcc2
diff --git a/src/add-ons/kernel/debugger/demangle/gcc3+.cpp 
b/src/add-ons/kernel/debugger/demangle/gcc3+.cpp
index 46419a7714..bfa3a2edf2 100644
--- a/src/add-ons/kernel/debugger/demangle/gcc3+.cpp
+++ b/src/add-ons/kernel/debugger/demangle/gcc3+.cpp
@@ -3726,6 +3726,8 @@ get_next_argument_gcc3(uint32* _cookie, const char* 
mangledName, char* name,
                                return B_BUFFER_OVERFLOW;
                        case ERROR_NO_MEMORY:
                                return B_NO_MEMORY;
+                       case ERROR_INVALID_PARAMETER_INDEX:
+                               return B_BAD_INDEX;
                        case ERROR_INTERNAL:
                        default:
                                return B_ERROR;


Other related posts:

  • » [haiku-commits] haiku: hrev52619 - src/add-ons/kernel/debugger/demangle - waddlesplash