Ticket #10738: 0001-KDL-Always-add-newline-to-exception-messages.patch

File 0001-KDL-Always-add-newline-to-exception-messages.patch, 2.2 KB (added by idefix, 5 years ago)

Patch to always add a newline after an exception message in KDL (untested).

  • src/system/kernel/debug/debug_parser.cpp

    From 734c1d0d232c26d6ee7e4709f38127a30ae34ada Mon Sep 17 00:00:00 2001
    From: Jeroen Oortwijn <oortwijn@gmail.com>
    Date: Sun, 6 Apr 2014 17:33:17 +0200
    Subject: [PATCH] KDL: Always add newline to exception messages
    
    ---
     src/system/kernel/debug/debug_parser.cpp |   10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/src/system/kernel/debug/debug_parser.cpp b/src/system/kernel/debug/debug_parser.cpp
    index 2a0398c..946c51a 100644
    a b ExpressionParser::_ParseCommand(debugger_command_pipe_segment& segment)  
    791791        if (ambiguous) {
    792792            snprintf(sTempBuffer, sizeof(sTempBuffer),
    793793                "Ambiguous command \"%s\". Use tab completion or enter "
    794                 "\"help %s\" get a list of matching commands.\n", token.string,
     794                "\"help %s\" get a list of matching commands.", token.string,
    795795                token.string);
    796796        } else {
    797797            snprintf(sTempBuffer, sizeof(sTempBuffer),
    798798                "Unknown command \"%s\". Enter \"help\" to get a list of "
    799                 "all supported commands.\n", token.string);
     799                "all supported commands.", token.string);
    800800        }
    801801
    802802        parse_exception(sTempBuffer, -1);
    evaluate_debug_expression(const char* expression, uint64* _result, bool silent)  
    11811181                kprintf_unfiltered("%s, at position: %d, in expression: %s\n",
    11821182                    sExceptionMessage, sExceptionPosition, expression);
    11831183            } else
    1184                 kprintf_unfiltered("%s", sExceptionMessage);
     1184                kprintf_unfiltered("%s\n", sExceptionMessage);
    11851185        }
    11861186    }
    11871187
    evaluate_debug_command(const char* commandLine)  
    12141214            kprintf_unfiltered("%s, at position: %d, in command line: %s\n",
    12151215                sExceptionMessage, sExceptionPosition, commandLine);
    12161216        } else
    1217             kprintf_unfiltered("%s", sExceptionMessage);
     1217            kprintf_unfiltered("%s\n", sExceptionMessage);
    12181218    }
    12191219
    12201220    sNextJumpBufferIndex--;
    parse_next_debug_command_argument(const char** expressionString, char* buffer,  
    12451245            kprintf_unfiltered("%s, at position: %d, in command line: %s\n",
    12461246                sExceptionMessage, sExceptionPosition, *expressionString);
    12471247        } else
    1248             kprintf_unfiltered("%s", sExceptionMessage);
     1248            kprintf_unfiltered("%s\n", sExceptionMessage);
    12491249        error = B_BAD_VALUE;
    12501250    }
    12511251