Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Delphinus.Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
"license_file": "License.txt",
"platforms": "Win32;Win64;OSX32",
"compiler_min": 22
"repository":{
"type":"bitbucket",
"user":"shadow_cs",
"name":"delphi-arm-backtrace"
}
}
362 changes: 0 additions & 362 deletions License.txt

This file was deleted.

56 changes: 0 additions & 56 deletions Proj/DelphiXE5/BacktraceConsoleTestProj.dpr

This file was deleted.

458 changes: 0 additions & 458 deletions Proj/DelphiXE5/BacktraceConsoleTestProj.dproj

This file was deleted.

Binary file removed Proj/DelphiXE5/BacktraceConsoleTestProj.res
Binary file not shown.
48 changes: 0 additions & 48 deletions Proj/DelphiXE5/BacktraceGroup.groupproj

This file was deleted.

33 changes: 0 additions & 33 deletions Proj/DelphiXE5/BacktraceTestProj.dpr

This file was deleted.

760 changes: 0 additions & 760 deletions Proj/DelphiXE5/BacktraceTestProj.dproj

This file was deleted.

Binary file removed Proj/DelphiXE5/BacktraceTestProj.res
Binary file not shown.
24 changes: 0 additions & 24 deletions Proj/DelphiXE5/PrintLines.bat

This file was deleted.

44 changes: 19 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
Delphi ARM Backtrace library
============================

This is a repository clone of the Delphi ARM Backtrace library for Delphinus-Support
- original repository https://bitbucket.org/shadow_cs/delphi-arm-backtrace
This repository is only a redirection link to provide Delphinus-Support - please report any issues or pull requests on [the main repository](https://bitbucket.org/shadow_cs/delphi-arm-backtrace)
------------------------------------------------------------------------------------------------------------------------------------------------------------

This is a simple library that allows you to create a stack trace and transform
it into format that can be fed to addr2line to convert it to function/line no.
it into format that can be fed to `addr2line` to convert it to function/line no.
information.

Usage
-----
Add the functions to your project and add compile.bat from sources to your
pre-build events. (Make sure compile.bat can find your NDK.)

Create a back trace by one of the functions from Posix.Backtrace and translate
it to symbol addresses using TPosixProcEntryList.
Create a back trace by one of the functions from `Posix.Backtrace` and translate
it to symbol addresses using `TPosixProcEntryList`.

Feed the generated lines to addr2line to get symbolic function names and line
information. (See PrintLines.bat how to do that.)
Feed the generated lines to `addr2line` to get symbolic function names and line
information. (See `PrintLines.bat` how to do that.)

The result will look like this:

0x00AC5AC6 (0x75A48AC6) /data/app-lib/com.embarcadero.BacktraceTestProj-1/libBacktraceTestProj.so
_ZN13Backtracetest9SomeFunc2Ei at D:\Documents\RAD Studio\Projects\ArmBacktrace\Tests/BacktraceTest.pas:57
0x00AC5E90 (0x75A48E90) /data/app-lib/com.embarcadero.BacktraceTestProj-1/libBacktraceTestProj.so
_ZN13Backtracetest9SomeFunc1Ei at D:\Documents\RAD Studio\Projects\ArmBacktrace\Tests/BacktraceTest.pas:92
0x00AC5EA8 (0x75A48EA8) /data/app-lib/com.embarcadero.BacktraceTestProj-1/libBacktraceTestProj.so
_ZN13Backtracetest4TObj4TestEv at D:\Documents\RAD Studio\Projects\ArmBacktrace\Tests/BacktraceTest.pas:118
0x00AC5EC0 (0x75A48EC0) /data/app-lib/com.embarcadero.BacktraceTestProj-1/libBacktraceTestProj.so
_ZN13Backtracetest5TObj24TestEv at D:\Documents\RAD Studio\Projects\ArmBacktrace\Tests/BacktraceTest.pas:111
0x00AC5A60 (0x75A48A60) /data/app-lib/com.embarcadero.BacktraceTestProj-1/libBacktraceTestProj.so
_ZN13Backtracetest9TTestForm12cmdTestClickEPN6System7TObjectE at D:\Documents\RAD Studio\Projects\ArmBacktrace\Tests/BacktraceTest.pas:125
0x009EF360 (0x75972360) /data/app-lib/com.embarcadero.BacktraceTestProj-1/libBacktraceTestProj.so
_ZN3Fmx8Controls8TControl5ClickEv at C:\Builds\TP\runtime\fmx/FMX.Controls.pas:3455
0x000022E9 (0x400B52E9) {Not executable} /system/lib/libc.so
??
??:0
```
0x001FC9BE (0xC972A9BE) /data/app/com.embarcadero.TestProject-2/lib/arm/libTestProject.so
System::_GetMem(NativeInt) at System.pas:4588
0x001F60F8 (0xC97240F8) /data/app/com.embarcadero.TestProject-2/lib/arm/libTestProject.so
System::TObject::NewInstance() at System.pas:16452
0x001FDAE0 (0xC972BAE0) /data/app/com.embarcadero.TestProject-2/lib/arm/libTestProject.so
System::_ClassCreate(void*, signed char) at System.pas:17777
0x001F61DA (0xC97241DA) /data/app/com.embarcadero.TestProject-2/lib/arm/libTestProject.so
System::TObject::TObject() at System.pas:16516
```

Known issues
------------
* There are no unit tests right now as this project is currently in proof of
concept state.
* Only tested on Android (Nexus 7, let me know if it works on your device),
no iOS support right now (patches welcome ;-) ).
* Tested on Android, MacOS, Linux no iOS support right now (patches welcome ;-) ).

TODO
----
Expand All @@ -54,4 +48,4 @@ License
-------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at http://mozilla.org/MPL/2.0/.
one at http://mozilla.org/MPL/2.0/.
126 changes: 0 additions & 126 deletions Source/Posix.Backtrace.pas

This file was deleted.

Loading