Monday, November 12, 2007

Hardware watchpoint in GDB

For some reason, the synatax for setting a hardware watchpoint in GDB is impossible to find in google. Or rather, there are misleading instructions on how to set the watchpoint. The instructions you'll find say "watch for when variable x gets changed by writing 'watch x'". But this never solves a memory corruption bug. At least for me.

This post is for my own purposes. I never want to waste 10 minutes searching for the proper syntax again.

Let's say I know that location 0xABCD1234 is getting corrupted.

Then the gdb command is:

> watch *((int*) 0xABCD1234)

Sunday, November 04, 2007

Mukasey

The president of the Uninted States continues to violate the constitution he swore to uphold in torturing prisoners. He has asked congress to replace his former torture-enabler, the embattled Gonzales, with a new puppet, Robert Mukasey. When Mukasey went before the Senate, he would not say that waterboarding is torture. Waterboarding is torture. Mukasey has publicly expressed his willingness to allow Bush to continue torturing, to continue breaking international treatries in violation of the constitution.

Charles Schumer, a senior democrat, is now supporting Mukasey's confirmation based on a private conversation he had with Mukasey. What's his rationale? He says that Mukasey agreed with a hypothetical: if Congress were to pass legistation saying that waterboarding is torture, then it would not be out-of-line with its constitutionally granted powers and the President wouldn't have any recourse (except of course, to veto the bill).

The logic here is tortured. Schumer seems to think this consession is a hat-tip to the separation-of-powers provisions of the constitution. When did the constitution need consessions made to it?

Moreover, its a circuitous consession. It makes congress do much more work than it needs to! Congress does not need to say that waterboarding is torture. Legal precident and human decency defines it as torture. Worst of all, if congress were to legistlate that waterboarding is torture, then it effectively grants immunity to water-boarders up until this point: "Oh, I just water boarded that guy because it wasn't illegal at the time."

Schumer is doing a grave disservice to the anit-torture camp. Why is toture so hard to stand against?