There are syntax differences in a STRDBG session of a C or C++ program.
On the 'eval' statement of your session, try the following statement:

EVAL **dataarea:c 30

This will work if dataarea is a pointer.

The ** dereferences the pointer to get at the memory it points to.

The :c tells is to display the memory as a character. (Try :x for hex as an alternative) Tip: Characters in C/C++ are null terminated. They will end with x'00', so the :x way of viewing the data lets you see the null terminators.

The 30 is just the number of characters in memory that you want to display. Nothing magical to 30.

If dataarea is a pointer to an array, try the following syntax:

EVAL *dataarea[1]:c 50

The [1] indicates that I want to view the 2nd array element (arrays start with zero in C/C++).


Stephen West
Lead Software Engineer
stephen.west@xxxxxxxxxxxxxx<mailto:stephen.west@xxxxxxxxxxxxxx>

From: C400-L <c400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik Schindler
Sent: Wednesday, September 3, 2025 2:39 PM
To: Bare Metal Programming IBM i (AS/400 and iSeries) <c400-l@xxxxxxxxxxxxxxxxxx>
Subject: [C400-L] Debugging C program strings with STRDBG

Hello,

some days ago, I finally found an easy entry into using the interactive debugger for debugging an RPG program.

Now I try to debug a C program. So I place the cursor on a char variable and all I get is e. g.:

dataarea = SPP:F441AE89590011B0

I presume SPP is for Space Pointer?

Is there an easy way to retrieve that string within the debugger?

Thanks!

Please note: I'm doing this on stone age V4R5. :-)

:wq! PoC

--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxxxxxxxx<mailto:C400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/c400-l<https://lists.midrange.com/mailman/listinfo/c400-l>
or email: C400-L-request@xxxxxxxxxxxxxxxxxx<mailto:C400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/c400-l<https://archive.midrange.com/c400-l>.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.