0

I am trying to learn how to debug programs with gdb following Debugging with GDB.The first chapter of this book present a sample seesion to debug programs.My question is where could I get this buggy verion of m4?I want to redo this sample debug seession.

thanks.

Community
  • 1
  • 1
Jichao
  • 40,341
  • 47
  • 125
  • 198

1 Answers1

1

The bug was likely injected into m4 on purpose (just to demonstrate GDB). I doubt there was ever an official release of GNU m4 which actually had this bug.

You can download any version of m4, change

len_lquote = strlen(lquote);

to

len_lquote = strlen(rquote);

in set_quotes(), and then redo the sample debugging session.

However, I see very little point in actually doing that. Your time would probably be spent more wisely if instead you select any open-source program you like and use, and try to find/fix a real open bug in it.

P.S. The online docs you referred to have moved here.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362