-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Made test more meaningful. Update version number * Fix issue with GDB-python not using virtual environment - The problem is that GDB's python does not use the path from the virtual environment. However, sys.path is populated in part by $PYTHONPATH. So, by passing on sys.path into $PYTHONPATH before invoking GDB, we can auto-populate sys.path to point GDB to the virtual environment. * Solve some packaging issues with python2 in gem5. - Testing this in a clean VM is very helpful.
- Loading branch information
Showing
4 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
/** | ||
* Test program for Lapidary simulations. | ||
* | ||
* Before you come yelling at me, yes, I know, this is not the best way to | ||
* compute the fibonacci sequence. I just wanted a simple program that took | ||
* several seconds to finish running so that realistic checkpoints could be | ||
* created from it. | ||
*/ | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <stdio.h> | ||
|
||
void ding(void) { printf("DING!\n"); } | ||
void dong(void) { printf("DONG!\n"); } | ||
uint64_t fib(uint64_t i) { | ||
if (i <= 1) { | ||
return i; | ||
} | ||
|
||
return fib(i - 1) + fib(i - 2); | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
ding(); | ||
dong(); | ||
ding(); | ||
dong(); | ||
for (uint64_t i = 0; i < 50; ++i) { | ||
printf("fib(%lu) = %lu\n", i, fib(i)); | ||
} | ||
|
||
return 0; | ||
} |