Hi Hamid,

This was discussed in one of the older threads, but here you go:

As for steps:

1. add a statment in a SConscript like this DebugFlag('MyFlagName'). This
is done typically in the SConscript closest to where you want to use it,
but I believe its not necessary

2. In the cc files where you want to use it include a header like
debug/MyFlagName.hh

3. Where ever you want to use it just use it like:

DPRINTF(MyFlagName, "I can add flags like this");

When you build in your build directory you will see a folder called debug
and as it builds you will see all the debug flag headers and corresponding
c-files and objects being generated by scons.


On Tue, Apr 3, 2012 at 4:33 AM, Hamid Reza Khaleghzadeh <
[email protected]> wrote:

> Hi all,
>
> I have added a debug flag by adding debugflag() command to
> gem5/src/cpu/SConscript file. I want to use the flag in
> gem5/src/cpu/exetrace.cc file, But I don't know how to do it. Could you
> help me?
>
> Thanks
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>



-- 
Ankit More
Ph.D Candidate, Electrical and Computer Engineering
Drexel University, Philadelphia PA

Phone: 267-912-4712
Email: [email protected]
Web: http://vlsi.ece.drexel.edu
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to