Skip to content

Commit

Permalink
version is now unsigned long
Browse files Browse the repository at this point in the history
  • Loading branch information
mulle-nat committed Jan 12, 2024
1 parent cb2c655 commit 947cc25
Show file tree
Hide file tree
Showing 17 changed files with 113 additions and 71 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ version.old
wilted/
mulle-template-composer-*
mulle-markdown-preview-*.html
coverage*.html
*.gcda
*.gcno
cola/wilted/
6 changes: 6 additions & 0 deletions .mulle/share/env/environment-extension.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .mulle/share/env/motd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .mulle/share/match/match.d/86-header--project-only-headers

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-c/c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-c/c-demo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-sde/c-cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .mulle/share/sde/version/mulle-sde/c-demo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ This currently just uses `<execinfo.h>`. It will need more code to support
windows. This is not doing much at the moment and not doing it very well.




| Release Version | Release Notes
|-------------------------------------------------------|--------------
| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/mulle-core/mulle-stacktrace.svg?branch=release) [![Build Status](https://github.com/mulle-core/mulle-stacktrace/workflows/CI/badge.svg?branch=release)](//github.com/mulle-core/mulle-stacktrace/actions)| [RELEASENOTES](RELEASENOTES.md) |
| ![Mulle kybernetiK tag](https://img.shields.io/github/tag/mulle-core/mulle-stacktrace.svg?branch=release) [![Build Status](https://github.com/mulle-core/mulle-stacktrace/workflows/CI/badge.svg?branch=release)](//github.com/mulle-core/mulle-stacktrace/actions) | [RELEASENOTES](RELEASENOTES.md) |






### You are here

![Overview](overview.dot.svg)




Expand Down Expand Up @@ -75,8 +84,10 @@ cmake --build build --config Release &&
cmake --install build --config Release
```


## Author

[Nat!](https://mulle-kybernetik.com/weblog) for Mulle kybernetiK
[Nat!](https://mulle-kybernetik.com/weblog) for Mulle kybernetiK



4 changes: 4 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 0.2.8

* Various small improvements

### 0.2.7

* remove package.json as it conflicts with clib.json
Expand Down
42 changes: 21 additions & 21 deletions cmake/reflect/_Dependencies.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions cmake/share/Environment.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cmake/share/Headers.cmake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 27 additions & 28 deletions src/mulle-stacktrace-execinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
//
// it gives 0 libMulleStandaloneObjC.dylib 0x000000010ab7e46d stacktrace + 61
// move past the address
static char *trim_belly_fat( char *s)
static char *_trim_belly_fat( char *s)
{
char *hex;
char *sym;
Expand All @@ -82,7 +82,7 @@ static char *trim_belly_fat( char *s)
}


static int trim_arse_fat( char *s)
static int _trim_arse_fat( char *s)
{
char *offset;

Expand All @@ -98,7 +98,7 @@ static int trim_arse_fat( char *s)
//
// it gives /lib64/ld-linux-x86-64.so.2(+0x10ca) [0x7ffff7fd40ca]
// or /home/src/../libMulleObjC-standalone.so(_mulle_objc_universe_crunch+0x176) [0x7ffff7f6fa5c]
static char *trim_belly_fat( char *s)
static char *_trim_belly_fat( char *s)
{
char *hex;
char *memo;
Expand All @@ -117,7 +117,6 @@ static char *trim_belly_fat( char *s)
}
return( memo);
}
hex++;

// remove boring filename path
memo = s;
Expand All @@ -126,7 +125,7 @@ static char *trim_belly_fat( char *s)
}


static int trim_arse_fat( char *s)
static int _trim_arse_fat( char *s)
{
char *offset;

Expand All @@ -139,27 +138,27 @@ static int trim_arse_fat( char *s)

#endif

static char *symbolize_nothing( void *adresse, size_t max, char *buf, size_t len, void **userinfo)
static char *_symbolize_nothing( void *adresse, size_t max, char *buf, size_t len, void **userinfo)
{
return( NULL);
}


static char *keep_belly_fat( char *s)
static char *_keep_belly_fat( char *s)
{
return( s);
}


static int keep_arse_fat( char *s)
static int _keep_arse_fat( char *s)
{
return( (int) strlen( s));
}


#define stracktrace_has_prefix( s, prefix) ! strncmp( s, prefix, sizeof( prefix) - 1)

static int trim_boring_functions( char *s, int size)
static int _trim_boring_functions( char *s, int size)
{
if( size == -1)
size = strlen( s);
Expand Down Expand Up @@ -198,7 +197,7 @@ static int keep_boring_functions( char *s, int size)

#ifndef HAVE_DLSYM

static int dump_less_shabby( struct mulle_stacktrace *stacktrace,
static int _dump_less_shabby( struct mulle_stacktrace *stacktrace,
char *s,
FILE *fp,
enum mulle_stacktrace_format format,
Expand All @@ -224,7 +223,7 @@ static int dump_less_shabby( struct mulle_stacktrace *stacktrace,



static void shabby_default_dump( struct mulle_stacktrace *stacktrace,
static void _shabby_default_dump( struct mulle_stacktrace *stacktrace,
void **callstack,
int frames,
int offset,
Expand All @@ -246,7 +245,7 @@ static void shabby_default_dump( struct mulle_stacktrace *stacktrace,
while( p > sentinel)
{
s = *--p;
if( ! dump_less_shabby( stacktrace, s, fp, format, delim))
if( ! _dump_less_shabby( stacktrace, s, fp, format, delim))
delim = delimchar;
}
free( strs);
Expand All @@ -256,10 +255,10 @@ static void shabby_default_dump( struct mulle_stacktrace *stacktrace,

static struct mulle_stacktrace dummy =
{
symbolize_nothing,
trim_belly_fat,
trim_arse_fat,
trim_boring_functions
_symbolize_nothing,
_trim_belly_fat,
_trim_arse_fat,
_trim_boring_functions
};


Expand Down Expand Up @@ -355,7 +354,7 @@ static void mulle_stacktrace_dump( struct mulle_stacktrace *stacktrace,

#if 0 // bringt nix, kann auch nicht mehr
strs = backtrace_symbols( p, 1);
dump_less_shabby( stacktrace, *strs, fp, format, delim);
_dump_less_shabby( stacktrace, *strs, fp, format, delim);
free( strs);
#endif
fprintf( fp, "%s %p", delim, address);
Expand Down Expand Up @@ -393,7 +392,7 @@ void _mulle_stacktrace( struct mulle_stacktrace *stacktrace,
#ifdef HAVE_DLSYM
mulle_stacktrace_dump( stacktrace, callstack, frames, offset, fp, delimchar, format);
#else
shabby_default_dump( stacktrace, callstack, frames, offset, fp, delimchar, format);
_shabby_default_dump( stacktrace, callstack, frames, offset, fp, delimchar, format);
#endif
}

Expand All @@ -413,23 +412,23 @@ int mulle_stacktrace_count_frames( void)

void _mulle_stacktrace_init_default( struct mulle_stacktrace *stacktrace)
{
stacktrace->symbolize = symbolize_nothing;
stacktrace->trim_belly_fat = trim_belly_fat;
stacktrace->trim_arse_fat = trim_arse_fat;
stacktrace->is_boring = trim_boring_functions;
stacktrace->symbolize = _symbolize_nothing;
stacktrace->trim_belly_fat = _trim_belly_fat;
stacktrace->trim_arse_fat = _trim_arse_fat;
stacktrace->is_boring = _trim_boring_functions;
}


void _mulle_stacktrace_init( struct mulle_stacktrace *stacktrace,
mulle_stacktrace_symbolizer_t *p_symbolize,
char *(*p_trim_belly_fat)( char *),
int (*p_trim_arse_fat)( char *),
char *(*p__trim_belly_fat)( char *),
int (*p__trim_arse_fat)( char *),
int (*p_is_boring)( char *, int size))
{
stacktrace->symbolize = p_symbolize ? p_symbolize : symbolize_nothing;
stacktrace->trim_belly_fat = p_trim_belly_fat ? p_trim_belly_fat : keep_belly_fat;
stacktrace->trim_arse_fat = p_trim_arse_fat ? p_trim_arse_fat : keep_arse_fat;
stacktrace->is_boring = p_is_boring ? p_is_boring : keep_boring_functions;
stacktrace->symbolize = p_symbolize ? p_symbolize : _symbolize_nothing;
stacktrace->trim_belly_fat = p__trim_belly_fat ? p__trim_belly_fat : _keep_belly_fat;
stacktrace->trim_arse_fat = p__trim_arse_fat ? p__trim_arse_fat : _keep_arse_fat;
stacktrace->is_boring = p_is_boring ? p_is_boring : keep_boring_functions;
}

#endif
Loading

0 comments on commit 947cc25

Please sign in to comment.