Re: [commited] small changes to fix hpux-cc compile

Michael Elizabeth Chastain
2004-05-16T15:55:00Z

> Yes, this was indeed my thinking and why i hardcoded it.

So what happens if your hardcoded auto array of size 4 ever overflows?
We get a nasty bit of stack corruption. I hate seeing code like this
creep into gdb. It works until something else changes and then it
quietly crashes or prints random bad results.

The reason this code stopped compiling is that TARGET_INT_BIT became
more dynamic; it changed from a manifest constant to a function call.

char dld_flags_buffer[4];
...
status = target_read_memory (addr, dld_flags_buffer, TARGET_INT_BIT / TARGET_CHAR_BIT);

That's just wrong!

Michael C