1
정의, 그래서 나는 이러한 기능을 구현하는 dylib를 만들었습니다, 나는 일반적인 시스템 바이너리에로드 아니에요. 그러나 버그가 있으며 디버깅하려고합니다.GDB/"malloc_error_break는"나는 malloc에 & 무료에 대한 자세한 내용은 시도하고
- malloc.dylib은 여기 내 동적 라이브러리
인 GDB 출력입니다 :
(gdb) set env DYLD_INSERT_LIBRARIES malloc.dylib
(gdb) break malloc_error_break
Function "malloc_error_break" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) r
Starting program: /bin/ls
[+] init()
[-] myMalloc requesting: 4096 bytes
[-] memory address: 200000
bash(2035) malloc: *** error for object 0x200000: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb)
내가 대한 혼란 스러워요하는 메시지
Function "malloc_error_break" not defined.
내가 시도입니다 그것에 중단 점을 설정합니다. 분명히 알 수 없기 때문에 분명히 깨지는 않을 것입니다.
어떤 도움이 필요합니까? 미리 감사드립니다.