C & C++

GCC Inline Assembly - PowerPC constraints - HOWTO?

Can anyone point out if there is any better way to have the following inline assembly block functionally complete where the Arguments are able to be defined as part of the C wrapper and used properly within the Assembly?

I'm wanting to keep

r0-r2,r13 and r31 SYS V4 ABI Reserved
r3-r7 for Function Returns and Arguments
r8-r12 for Polymorph Internal variables
r14-r31 for Plugin Internal variables

I have so far got no reason to see why I can not do this ...

Can anyone point me at further reading for clarifying this please?

Forums: 

how to avoid apps<->SDK variables conflicts in best way ?

Pretty offten some programms from other oses use in their code different kind of variables for their internal purposes, and offten in let's say games, you have Screen, Point, EventHandler and co, which all the time conflicts with SDK ones.

Currently, i have just 2 ways to fix it:

1. Disable it in SDK.

That way fast, as need to change only in one place, but its bad just because you can forget about that commenting and have lots of errors later, while you will trying to understand why.

2. Change them in the code of the apps itself.

Forums: 

C++ compiler

I found a example code, and want to compile it as C++, but there's some questions I have.
I'm from the PC world and have used Visual Studio and a little Linux (GCC), but the Visual Studio enviroment makes it a lot easier than have to fiddle around with make files... Ok, I'm now trying to use CodeBench, so I don't have to use shell at least... :)

Forums: 

Track memory leaks and Memguard (solved? and some infos)

Hi Coders,

Well I would like to track some memory leaks in my C++ progs (uses of new and delete).
I tried the "include .h sources" like mem* (don't remember the names), i.e. include some redefinitions of new methods. Not useful here.

I tried to use memguard.
I use it by launching memguard -client name_of_prog (here jeu).

The output is written below :

Forums: 

Addr2Line doesn't work

I remember that with an old SDK I could get Addr2Line to work, but since some SDK (or OS4?) update I've never had any success. All it outputs is:

??
??:0

I am compiling my C++ program with the -ggdb option. When it crashes, I am taking the offset from the Grim Reaper, and passing it to Addr2Line along the lines of:
ppc-amigaos-addr2line -e program_name -f offset2

Or just:
addr2line -e program_name -f offset2

For example:
addr2line -e FooBar -f 0xc9b70r

Does anyone have any suggestions?

Forums: 

Pages

Subscribe to RSS - C & C++