Software that isn't in NDK27c

196 views
Skip to first unread message

John Dallman

unread,
Mar 12, 2025, 8:47:00 AMMar 12
to andro...@googlegroups.com
There are some tools that I'm used to using which were in NDK23b, the last version I used, but are not in 27c:

'as' was in aarch64-linux-android/bin/ in NDK23b. We have an assembler source file (written by enh), which contains tests for PAC and BTI. We do the assembling via clang, but I thought it used 'as' to do the assembling? Does it have an internal assembler? I know llvm-as isn't relevant; I saw the note about it in the build system maintainers document. 

There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb for debugging macOS code and I'm not scared of it, but how do I start an executable on Android and debug it with lldb on the host Linux? I'm working purely with the command line, and don't use Android Studio.

Thanks very much,

John    

Dan Albert

unread,
Mar 12, 2025, 1:29:25 PMMar 12
to andro...@googlegroups.com
Yeah, whatever sources you were previously passing to `as` you should just pass to `clang`. Some driver arguments may change, but I think other than that the only change is that the C preprocessor will be run on your asm sources.

There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb for debugging macOS code and I'm not scared of it, but how do I start an executable on Android and debug it with lldb on the host Linux? I'm working purely with the command line, and don't use Android Studio.

Same as before: ndk-gdb (or ndk-lldb, either works, they're aliased to the same implementation). I don't recall the incantation for non-app executables, but I'm pretty sure it's capable of it.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAH1xqgnGJEh0ZUPZAOMKLi%2BjednmGi4KMoZn7-yX1EPDO4U1Rw%40mail.gmail.com.

enh

unread,
Mar 12, 2025, 1:33:11 PMMar 12
to andro...@googlegroups.com
On Wed, Mar 12, 2025 at 1:29 PM 'Dan Albert' via android-ndk
<andro...@googlegroups.com> wrote:
>
> Yeah, whatever sources you were previously passing to `as` you should just pass to `clang`. Some driver arguments may change, but I think other than that the only change is that the C preprocessor will be run on your asm sources.

is that true? it doesn't distinguish between .s (no preprocessor) and
.S (preprocessor)?

>> There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb for debugging macOS code and I'm not scared of it, but how do I start an executable on Android and debug it with lldb on the host Linux? I'm working purely with the command line, and don't use Android Studio.
>
>
> Same as before: ndk-gdb (or ndk-lldb, either works, they're aliased to the same implementation). I don't recall the incantation for non-app executables, but I'm pretty sure it's capable of it.

yeah, it's probably obvious from the help output, but if not it should
be close enough to its platform sibling gdbclient^Wlldbclient:
https://source.android.com/docs/core/tests/debug/gdb

> On Wed, Mar 12, 2025 at 5:47 AM John Dallman <jgdats...@gmail.com> wrote:
>>
>> There are some tools that I'm used to using which were in NDK23b, the last version I used, but are not in 27c:
>>
>> 'as' was in aarch64-linux-android/bin/ in NDK23b. We have an assembler source file (written by enh), which contains tests for PAC and BTI. We do the assembling via clang, but I thought it used 'as' to do the assembling? Does it have an internal assembler? I know llvm-as isn't relevant; I saw the note about it in the build system maintainers document.
>>
>> There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb for debugging macOS code and I'm not scared of it, but how do I start an executable on Android and debug it with lldb on the host Linux? I'm working purely with the command line, and don't use Android Studio.
>>
>> Thanks very much,
>>
>> John
>>
>> --
>> You received this message because you are subscribed to the Google Groups "android-ndk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
>> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAH1xqgnGJEh0ZUPZAOMKLi%2BjednmGi4KMoZn7-yX1EPDO4U1Rw%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhsn-%2BNFbV15Jw7oh7Ubr_TAiEBDSZjxANt9hehjd8ROKg%40mail.gmail.com.

Dan Albert

unread,
Mar 12, 2025, 2:24:55 PMMar 12
to andro...@googlegroups.com
is that true? it doesn't distinguish between .s (no preprocessor) and
.S (preprocessor)?

Ah, that might be true. 

John Dallman

unread,
Mar 13, 2025, 6:57:43 AMMar 13
to andro...@googlegroups.com
I'm passing my assembler source to clang already. So that should be OK. 

John Dallman

unread,
Mar 17, 2025, 1:44:54 PMMar 17
to andro...@googlegroups.com
> > There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb
> > for debugging macOS code and I'm not scared of it, but how do I start an executable
> > on Android and debug it with lldb on the host Linux? I'm working purely with the command
> > line, and don't use Android Studio.
> Same as before: ndk-gdb (or ndk-lldb, either works, they're aliased to the same implementation).
> I don't recall the incantation for non-app executables, but I'm pretty sure it's capable of it.

It turned out to be quite a bit different from using gdb, but I found
a helpful web page at
https://iree.dev/developers/debugging/android-with-lldb/

Thanks again,

John

On Wed, Mar 12, 2025 at 5:29 PM 'Dan Albert' via android-ndk
<andro...@googlegroups.com> wrote:
>
> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhsn-%2BNFbV15Jw7oh7Ubr_TAiEBDSZjxANt9hehjd8ROKg%40mail.gmail.com.

enh

unread,
Mar 17, 2025, 3:54:25 PMMar 17
to android-ndk


On Mon, Mar 17, 2025, 13:44 John Dallman <jgdats...@gmail.com> wrote:
> > There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb
> > for debugging macOS code and I'm not scared of it, but how do I start an executable
> > on Android and debug it with lldb on the host Linux? I'm working purely with the command
> > line, and don't use Android Studio.
> Same as before: ndk-gdb (or ndk-lldb, either works, they're aliased to the same implementation).
> I don't recall the incantation for non-app executables, but I'm pretty sure it's capable of it.

It turned out to be quite a bit different from using gdb, but I found
a helpful web page at
https://iree.dev/developers/debugging/android-with-lldb/

that looks like exactly what the ndk-gdb script does for you?  is there something i'm missing that we should add to the script?


Thanks again,

John

On Wed, Mar 12, 2025 at 5:29 PM 'Dan Albert' via android-ndk
<andro...@googlegroups.com> wrote:
>
> Yeah, whatever sources you were previously passing to `as` you should just pass to `clang`. Some driver arguments may change, but I think other than that the only change is that the C preprocessor will be run on your asm sources.
>
>> There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb for debugging macOS code and I'm not scared of it, but how do I start an executable on Android and debug it with lldb on the host Linux? I'm working purely with the command line, and don't use Android Studio.
>
>
> Same as before: ndk-gdb (or ndk-lldb, either works, they're aliased to the same implementation). I don't recall the incantation for non-app executables, but I'm pretty sure it's capable of it.
>
> On Wed, Mar 12, 2025 at 5:47 AM John Dallman <jgdats...@gmail.com> wrote:
>>
>> There are some tools that I'm used to using which were in NDK23b, the last version I used, but are not in 27c:
>>
>> 'as' was in aarch64-linux-android/bin/ in NDK23b. We have an assembler source file (written by enh), which contains tests for PAC and BTI. We do the assembling via clang, but I thought it used 'as' to do the assembling? Does it have an internal assembler? I know llvm-as isn't relevant; I saw the note about it in the build system maintainers document.
>>
>> There's no gdb or gdbserver. That's not too surprising. There is an lldb. I've used lldb for debugging macOS code and I'm not scared of it, but how do I start an executable on Android and debug it with lldb on the host Linux? I'm working purely with the command line, and don't use Android Studio.
>>
>> Thanks very much,
>>
>> John
>>
>> --
>> You received this message because you are subscribed to the Google Groups "android-ndk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
>> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAH1xqgnGJEh0ZUPZAOMKLi%2BjednmGi4KMoZn7-yX1EPDO4U1Rw%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhsn-%2BNFbV15Jw7oh7Ubr_TAiEBDSZjxANt9hehjd8ROKg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.

John Dallman

unread,
Mar 18, 2025, 8:15:25 AMMar 18
to andro...@googlegroups.com
> that looks like exactly what the ndk-gdb script does for you? is there something i'm missing that we should add to the script?

I don't think so. I wasn't familiar with that script, and I'm not much
good at Python: I was already elderly when it appeared and I find it
rather confusing. I prefer to roll my own solutions in bash.

Thanks,

John
> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAJgzZopPH%3D19W75N5EUWVDQxqE_Pd8Ug0p9E85_GkczLZqNfAw%40mail.gmail.com.

enh

unread,
Mar 18, 2025, 9:03:00 AMMar 18
to andro...@googlegroups.com
On Tue, Mar 18, 2025 at 8:15 AM John Dallman <jgdats...@gmail.com> wrote:
>
> > that looks like exactly what the ndk-gdb script does for you? is there something i'm missing that we should add to the script?
>
> I don't think so. I wasn't familiar with that script, and I'm not much
> good at Python: I was already elderly when it appeared and I find it
> rather confusing. I prefer to roll my own solutions in bash.

since you're basically begging for a rant there...

i had a friend who joined google before i did. he'd been a keen
scripting language user but then suddenly started doing everything in
bash. i couldn't understand that --- until i came to google, found
that the two supported options at google are python and bash, and
started using python (which wasn't popular in europe at the time, so
was new to me).

a scripting language with delusions of grandeur that make it not even
a good scripting language, but also not a good real language. the best
example of https://en.wikipedia.org/wiki/Worse_is_better for my money.
the only good thing i can say about it is "at least it's not perl"!
> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAH1xqgkiJDNvCUOLXy%2B%3DxZBhXSAHSRDAMxXAJDnatcWPnowgAA%40mail.gmail.com.

John Dallman

unread,
Mar 21, 2025, 6:00:11 AMMar 21
to andro...@googlegroups.com
<fx:applause>

The other thing that makes me prefer shell scripting for Android is
that it mostly works the same on my development host and on the
device. This is easier on me.

John

On Tue, Mar 18, 2025 at 1:02 PM 'enh' via android-ndk
> To view this discussion visit https://groups.google.com/d/msgid/android-ndk/CAJgzZoqGapsYU1Sfe3TDN3-J9ua9bEvu%2BUEqyHuFXW0M8n7AhA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages