diff --git a/ChangeLog b/ChangeLog index 18031a898..d9039fa1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-05-26 Mirko Viviani + + * Source/NSDebug.m (_NSPrintForDebugger): new function to support print + object (po) cmd of gdb. + 2001-05-25 Adam Fedor * configure.in: Use -lobjc with NeXT_RUNTIME. diff --git a/Source/NSDebug.m b/Source/NSDebug.m index b6ff1b4bd..29a1f0747 100644 --- a/Source/NSDebug.m +++ b/Source/NSDebug.m @@ -760,3 +760,11 @@ void *NSReturnAddress(int offset) return NULL; } + +const char *_NSPrintForDebugger(id object) +{ + if (object && [object respondsToSelector: @selector(description)]) + return [[object description] cString]; + + return NULL; +}