mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor stack trace improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25688 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7fde7c79d9
commit
a92018afe3
3 changed files with 21 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-12-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSException.m: fix error reporting module containing code
|
||||
and limit the length of the stack trace.
|
||||
|
||||
2007-12-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURL.m: Increase detail of information about bad URL string
|
||||
|
|
|
@ -1110,12 +1110,24 @@ NSMutableArray *
|
|||
GSPrivateStackAddresses(void)
|
||||
{
|
||||
unsigned n = NSCountFrames();
|
||||
NSMutableArray *stack = [NSMutableArray arrayWithCapacity: n];
|
||||
NSMutableArray *stack;
|
||||
unsigned i;
|
||||
jmp_buf *env;
|
||||
void (*old)(int);
|
||||
void *val;
|
||||
|
||||
/* There should be more frame addresses than return addresses.
|
||||
*/
|
||||
if (n > 0)
|
||||
{
|
||||
n--;
|
||||
}
|
||||
if (n > 0)
|
||||
{
|
||||
n--;
|
||||
}
|
||||
|
||||
stack = [NSMutableArray arrayWithCapacity: n];
|
||||
env = jbuf();
|
||||
if (setjmp(*env) == 0)
|
||||
{
|
||||
|
|
|
@ -216,7 +216,7 @@ GSPrivateBaseAddress(void *addr, void **base)
|
|||
function: (NSString*)function
|
||||
line: (int)lineNo
|
||||
{
|
||||
_module = RETAIN(_module);
|
||||
_module = RETAIN(module);
|
||||
_address = address;
|
||||
_fileName = [file copy];
|
||||
_functionName = [function copy];
|
||||
|
@ -424,7 +424,8 @@ static void find_address (bfd *abfd, asection *section,
|
|||
|
||||
- (GSFunctionInfo *) functionForAddress: (void*) address
|
||||
{
|
||||
struct SearchAddressStruct searchInfo = { address, self, _symbols, nil };
|
||||
struct SearchAddressStruct searchInfo =
|
||||
{ address, self, _symbols, nil };
|
||||
|
||||
bfd_map_over_sections (_abfd,
|
||||
(void (*) (bfd *, asection *, void *)) find_address, &searchInfo);
|
||||
|
|
Loading…
Reference in a new issue