|
Laser game V2B1
|
This class registers the game_paramereters trough the keyboard input so that the RunGame class has the neccesary data to start the game. More...
#include <reg_game.hpp>
Public Member Functions | |
| RegGame (GameRules &g, DisplayController &display) | |
| Constructor which initialises the objects and sets the taskpriority to 9. More... | |
| void | write (const char k) override |
| writes a char value to the keypadchannel More... | |
| void | write (uint16_t msg) override |
| Writes a 16 bit value to the messagechannel. More... | |
This class registers the game_paramereters trough the keyboard input so that the RunGame class has the neccesary data to start the game.
Definition at line 23 of file reg_game.hpp.
|
inline |
Constructor which initialises the objects and sets the taskpriority to 9.
| g | Gamerules class you want to set the values |
| display | The display |
Definition at line 49 of file reg_game.hpp.
|
inlineoverridevirtual |
writes a char value to the keypadchannel
| k | given char |
Implements KeypadListener.
Definition at line 61 of file reg_game.hpp.
|
inlineoverridevirtual |
Writes a 16 bit value to the messagechannel.
| msg | 16 bit message you want to send |
Implements MsgListener.
Definition at line 70 of file reg_game.hpp.


The UVM scoreboard is easily integrated into your existing testbench environment.
To get the UVM scoreboard compiled you need to add src/pk_syoscb.sv to your list of files that are complied when compiling your testbench. How this is done is highly dependent on the verification environment since some environments compile everything into different libraries and some do not etc.
Once the UVM scoreboard is compiled with the verification environment then it is accessible either by explicit scoping:
class myclass;
pk_syoscb::cl_syoscb my_new_scb;
...
or by importing the complete package into your scope:
import pk_syoscb::*; class myclass; cl_syoscb my_new_scb; ...
The UVM scoreboard itself needs to be instantiated along with the configuration object. The simplest way to to this is to add the UVM scoreboard and the configuration object to the UVM environment - note that the configuration object is passed to the scoreboard via the config_db:
import pk_syoscb::*; class cl_scbtest_env extends uvm_env; cl_syoscb syoscb; cl_syoscb_cfg syoscb_cfg; `uvm_component_utils_begin(cl_scbtest_env) `uvm_field_object(syoscb, UVM_ALL_ON) `uvm_field_object(syoscb_cfg, UVM_ALL_ON) `uvm_component_utils_end ... endclass: cl_scbtest_env function void cl_scbtest_env::build_phase(uvm_phase phase); super.build_phase(phase); // Create the scoreboard configuration object this.syoscb_cfg = cl_syoscb_cfg::type_id::create("syoscb_cfg"); // Pass the scoreboard configuration object to the config_db uvm_config_db #(cl_syoscb_cfg)::set(this, "syoscb", "cfg", this.syoscb_cfg); // Create the scoreboard this.syoscb = cl_syoscb::type_id::create("syoscb", this); ... endfunction: build_phase
The UVM scoreboard configuration object needs to be configured after it has been created. The following example shows how two queues Q1 and Q2 wit Q1 as the primary queue. Furthermore, one producer P1 is added to both queues:
function void cl_scbtest_env::build_phase(uvm_phase phase); super.build_phase(phase); // Create the scoreboard configuration object this.syoscb_cfg = cl_syoscb_cfg::type_id::create("syoscb_cfg"); // Configure the scoreboard this.syoscb_cfg.set_queues({"Q1", "Q2"}); void'(this.syoscb_cfg.set_primary_queue("Q1")); void'(this.syoscb_cfg.set_producer("P1", {"Q1", "Q2"})); // Pass the scoreboard configuration object to the config_db uvm_config_db #(cl_syoscb_cfg)::set(this, "syoscb", "cfg", this.syoscb_cfg); // Create the scoreboard this.syoscb = cl_syoscb::type_id::create("syoscb", this); ... endfunction: build_phase
The function based API is very easy to use once you have done the configuration and instantiation of the scoreboard as describe above.
Whenever you need to add an UVM sequence item to a queue produced by a specified producer then you simply invoke the cl_syoscb::add_item() method:
// *NOTE*: Assumes syoscb is handle to an instance of the scoreboard and // item1 is a handle to a UVM sequence item ... // Insert UVM sequence item for queue: Q1, for producer: P1 syoscb.add_item("Q1", "P1", item1);
Invoking the cl_syoscb::add_item() method will simply wrap the UVM sequence item in a cl_syoscb_item object, add it the correct queue and finally invoke the configured compare method.
The UVM environment will typically contain a handle to the scoreboard as described above. This can then be utilized if UVM sequences needs to be added from a test case:
class cl_scbtest_seq_item extends uvm_sequence_item; //------------------------------------- // Randomizable variables //------------------------------------- rand int unsigned int_a; //------------------------------------- // UVM Macros //------------------------------------- `uvm_object_utils_begin(cl_scbtest_seq_item) `uvm_field_int(int_a, UVM_ALL_ON) `uvm_object_utils_end //------------------------------------- // Constructor //------------------------------------- function cl_scbtest_seq_item::new (string name = "cl_scbtest_seq_item"); super.new(name); endfunction endclass: cl_scbtest_seq_item class cl_scbtest_test extends uvm_test; //------------------------------------- // Non randomizable variables //------------------------------------- cl_scbtest_env scbtest_env; //------------------------------------- // UVM Macros //------------------------------------- `uvm_component_utils(cl_scbtest_test) //------------------------------------- // Constructor //------------------------------------- function new(string name = "cl_scbtest_test", uvm_component parent = null); super.new(name, parent); endfunction: new //------------------------------------- // UVM Phase methods //------------------------------------- function void build_phase(uvm_phase phase); super.build_phase(phase); scbtest_env = cl_scbtest_env::type_id::create("scbtest_env", this); endfunction: build_phase task run_phase(uvm_phase phase); super.run_phase(phase); begin cl_scbtest_seq_item item1; item1 = cl_scbtest_seq_item::type_id::create("item1"); item1.int_a = 'h3a; scbtest_env.syoscb.add_item("Q1", "P1", item1); end begin cl_scbtest_seq_item item1; item1 = cl_scbtest_seq_item::type_id::create("item1"); item1.int_a = 'h3a; scbtest_env.syoscb.add_item("Q2", "P1", item1); end endtask: run_phase endclass: cl_scbtest_test
The TLM API is even easier to use than the function based API. The scoreboard provides generic UVM subscribers which can be connected to anything which has a UVM analysis port (e.g. a UVM monitor). Typically, the UVM agents inside the UVM environment contain one or more monitors with UVM analysis ports which should be connected to the scoreboard. The following example has two agents which each has a monitor. The monitors are connected to Q1 and Q2 in the scoreboard:
import pk_syoscb::*; class cl_scbtest_env extends uvm_env; cl_syoscb syoscb; cl_syoscb_cfg syoscb_cfg; myagent agent1; myagent agent2; ... function void build_phase(uvm_phase phase); ... // Configure and create the scoreboard // Create and configure the agents ... endfunction: build_phase ... function void connect_phase(uvm_phase phase); super.connect_phase(phase); begin cl_syoscb_subscriber subscriber; // Get the subscriber for Producer: P1 for queue: Q1 and connect it // to the UVM monitor producing transactions for this queue subscriber = this.syoscb.get_subscriber("Q1", "P1"); this.agent1.mon.<analysis port>.connect(subscriber.analysis_export); // Get the subscriber for Producer: P1 for queue: Q2 and connect it // to the UVM monitor producing transactions for this queue subscriber = this.syoscb.get_subscriber("Q2", "P1"); this.agent1.mon.<analysis port>.connect(subscriber.analysis_export); end endfunction: connect_phase
Finally, the wanted queue and compare algorithm implementation needs to be selected. This is done by factory overwrites since they can be changed test etc.
NOTE: This MUST be done before creating the scoreboard!
The following queue implementations are available:
and the following compare algorithms are available:
The following example shows how they are configured:
cl_syoscb_queue::set_type_override_by_type(cl_syoscb_queue::get_type(), cl_syoscb_queue_std::get_type(), "*"); factory.set_type_override_by_type(cl_syoscb_compare_base::get_type(), cl_syoscb_compare_ooo::get_type(), "*");
The full build phase, including the factory overwrites, of cl_scbtest_env is shown here for completeness:
function void cl_scbtest_env::build_phase(uvm_phase phase); super.build_phase(phase); // Use the standard SV queue implementation as scoreboard queue cl_syoscb_queue::set_type_override_by_type(cl_syoscb_queue::get_type(), cl_syoscb_queue_std::get_type(), "*"); // Set the compare strategy to be OOO factory.set_type_override_by_type(cl_syoscb_compare_base::get_type(), cl_syoscb_compare_ooo::get_type(), "*"); // Create the scoreboard configuration object this.syoscb_cfg = cl_syoscb_cfg::type_id::create("syoscb_cfg"); // Configure the scoreboard this.syoscb_cfg.set_queues({"Q1", "Q2"}); void'(this.syoscb_cfg.set_primary_queue("Q1")); void'(this.syoscb_cfg.set_producer("P1", {"Q1", "Q2"})); // Pass the scoreboard configuration object to the config_db uvm_config_db #(cl_syoscb_cfg)::set(this, "syoscb", "cfg", this.syoscb_cfg); // Create the scoreboard this.syoscb = cl_syoscb::type_id::create("syoscb", this); ... endfunction: build_phase
|
Project: SyoSil ApS UVM Scoreboard, Revision: <IP_ADDRESS> Copyright 2014-2015 SyoSil ApS All Rights Reserved Worldwide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
Doxygen Version: 1.6.1 IDV SV Filter Version: 2.6.2 Sat Nov 28 05:41:54 2015 |


Russia to Deploy Orbital Communications System Which Will Have 28 Satellites by 2024 - Operator
The deployment of the new generation of the Gonets satellite system will begin in five years, Oleg Khimochko, first deputy general director of the Gonets company (Roscosmos' single operator for communication, broadcasting and relay systems), said.
“It is planned for 2024,” Khimochko said, answering a question about the timing of the start of flight tests of the system.
The constellation will comprise 28 satellites, arranged in four groups, each of which will include seven satellites. The satellites will be placed into orbit at a height of 1,500 kilometers (932 miles).
Currently there is a constellation of 12 Gonets satellites in orbit.
Russia's next-generation Gonets satellite constellation will provide users with telephone-communication services, Oleg Khimochko said.
"Within the framework of the next-generation Gonets system, we also plan to provide telephone-communication services on the Russian territory. We believe the implementation of this goal would be very much important and timely, taking into consideration that foreign companies, such as Iridium, Globalstar, Inmarsat and Thuraya, are currently chiefly presented in the Russian market of satellite telephone-communication," Khimochko said.
Currently, operators providing telephone-communication services in Russia are using foreign satellite constellations. Even the Russian Defense Ministry uses services provided by US operator Iridium.
Roscosmos chief Dmitry Rogozin has said that the new satellite system will provide Internet of things services.


Laguna Creek Makers is a MAKER focused parent group for kids from 3-99 years old located in the Laguna Creek area of Elk Grove, California. We provide our kids opportunities to Make and Learn. We maintain a resource library for Members to use.
We meet monthly and host activities. In the past year we've had activities such as: Tesla Coil Making, Quadcopter Assembly, Duck Tape Wallet Making, Basic Circuits, Introduction to Arduinos, RetroPie, Programming Microbit,...
As scientists, we love to apply the scientific method to learn about the world around us and make new discoveries.
Close ProjectWe live in a world surrounded by technology. As Makers we are curious about how it works and want to contribute to new advances. We aren't afraid of making mistakes, but are more interested in the adventure of learning.
Close ProjectAs Engineers, we love to look for inventive solutions to problems. We create solutions using materials we have at hand through planning, building, and testing.
We utilize many different tools to create. 3D Printers, CNC Machines, Laser Cutters, and other tools help us to go from concept to prototype. Knowing how to use these tools in the day and age is integral to our Engineering Skills.
Close ProjectAs Makers, we aren't content to just play. We want to create. We love to learn about computers, software development, and graphics. We create our own games that interact with the world around us and help others to learn.
Close ProjectAs Mathematicians, we use the power of math to invent, explore, and simulate the world around us. We use math in all aspects of Making: Science, Technology, Engineering, and having fun.
Close ProjectAs Makers, we are interested in helping our community. We want to make the world a better place for everyone, so we love to share our ideas/inventions openly, are respectful of others, and want others to be interested in the fun of Making
Close Project


{%extends "awards/base.html"%} {% load bootstrap5 %} {% block content %}
Password or Username is incorrect
Don't have an account?


Hypothesis Defining Diagram
"Actual Property" established by a process of reasoning based on one or more other properties of this "Subject" or other directly or indirectly related "Subjects".
Properties may be deduced only from the existence of other properties. These may be associated either with the target SUBJECT or with one or more other, associated, SUBJECTS.
Example.
A GP identifies that a patient has an "elevated temperature" because they have a
temperature of 101 degrees.
Associations From:
| Only One |
deduction |
One or Many |
Basis For Hypothesis |
Supertypes:
Actual Property


Hello
This project shows how to use a **Static Bridge or Relay
**to share a property between Visual Tree elements and elements that have been removed from the UI, due to source data changes. In this example, a forum poster wondered why they got the following error when they deleted an item from the data bound
to a DataGrid.
System.Windows.Data Error: 4 : Cannot find source for binding with reference**'RelativeSource FindAncestor**,
AncestorType=**'System.Windows.Controls.DataGrid'**,AncestorLevel='1''.
BindingExpression:Path=**CanUserAddRows**; DataItem=null; target element is 'DataGridCell' (Name='');target property is 'NoTarget' (type 'Object')
The problem was being caused by the following, perfectly acceptable trigger on the DataGridCell...
The **RelativeSource**was using **
FindAncestor**to traverse up the Visual Tree to find the DataGrid.
When an item was removed from the source collection, the DataGrid removes the row.
However, when the row is removed, it triggers the IsSelected binding to update, which causes the MultiDataTrigger to go check the CanUserAddRows property of the DataGrid. But the row is now "orphaned" from the parent control, so FindAncestor
cannot find the source. **That is what causes the error**.
**The answer is a Static Bridge or Relay, whatever you want to call it, there are many uses, this article is to explain the concept for you to adapt as you need.**
publicclass Bridge : FrameworkElement, INotifyPropertyChanged
{
publicBridge()
{
DataContext =this;
}
bool_BoolUserAddRows;
publicbool BoolUserAddRows
{
get
{
return_BoolUserAddRows;
}
set
{
if(_BoolUserAddRows != value)
{
_BoolUserAddRows = value;
RaisePropertyChanged("BoolUserAddRows");
}
}
}
voidRaisePropertyChanged(stringprop)
{
if(PropertyChanged !=null)
PropertyChanged(this,new PropertyChangedEventArgs(prop));
}
publicevent PropertyChangedEventHandler PropertyChanged;
}
It inherits FrameworkElement simply for easy use in XAML and DataContext.
This is then made available to all the Window's controls in the Resources:
In this example, it is used in the DataGrid to pass out and control the CanUserAddRowsProperty, and is available to the outgoing, orphaned row control triggers via the same StaticResource MyBridge.This available in a [**demo
project here**](http://code.msdn.microsoft.com/WPF-Parsing-XAML-into-440bdfed).
This article has also been published on MSDN Samples Gallery as a project you can download and try. It includes two DataGrids, first the broken one, which you can see the error in Visual Studio's Output tab. The second shows the fixed
DataGrid, which does not trigger an error when you click to remove a row.
[![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/0243.RelativeSourceAncestorBindingError.png)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/0243.RelativeSourceAncestorBindingError.png)
***This small article is part of a**[**series of WPF "How To" articles**](http://social.technet.microsoft.com/wiki/contents/articles/12346.wpfhowto-a-collection-of-helpful-short-articles.aspx)**, in response to
real user questions on the***[***MSDN WPF Forum***](http://social.msdn.microsoft.com/Forums/en/wpf)***.***
This available in a [**demo project here**![ ](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-components-sitefiles/10_5F00_external.png "This link is external to TechNet Wiki. It will open in a new window.")](http://code.msdn.microsoft.com/WpfHowTo-Avoid-Binding-dcadde3a)
- [Link to original MSDN WPF Forum Question](http://social.msdn.microsoft.com/Forums/en/wpf/thread/b4c702a8-d032-4481-a0b9-8bef31217e5a)


REVIEW: lynda.com
byA few months ago at work, I and the other web designer got lynda.com accounts. After test-driving it for a few months, I have to say that my employer’s money was well spent! lynda.com is a great web design learning resource!
A quick history: lynda.com is an online training website that, as of this post, offers over 54,000 courses on web design, graphic design and web development. It covers a wide array of topics: from beginner’s level ActionScript to advanced Adobe Illustrator skills. All of their courses are instructor-led and stored online (meaning you can take each course at your own pace). Most exercises require that you create code as the instructors speaks but you can save time and download a course’s exercise files if you sign up for one of the premium packages. Along with design and development courses, lynda.com also offers video lectures from a wide array of design and artistic experts. If you don’t want to take a course online, DVDs of all the courses and lectures are for sale through the website.
How I Tested
Roughly 75% of my lynda.com test drive consisted of going through courses around skill-sets that I needed to improve. At the time, that meant I went through most their ActionScript 3 and JavaScript-related courses along with their PHP/MySQL and .NET courses. Each course lasted an average of six hours of and took me an average of five days to complete. 20% consisted of me reviewing only a few chapters of certain courses, just so I can get the answers I needed, mostly PhotoShop. The remaining 5% consisted of going through some of the lecture videos. I also had a premium account and access to all the exercise files.
Results
I may not have gone through all 54,000 courses but I can tell you that the following was true for each one that I took:
- the course instructors and lecturers were clear and knew exactly what they were talking about.
- the courses assisted me in solving a problem or a set of problems.
- the exercises that I performed produced exactly what the course instructors said that they would.
Who Will Get The Most Out Of Lynda
Without question, graphic designers and front-end web developers will get the most bang for the buck out of Lynda…especially PhotoShop freaks.
The About Lynda documentary from October 2009 (viewable here) boasted that the site contained 333 Adobe-related courses. So that’s more than enough content for burgeoning and established illustrators, desktop publishers and web designers. But of those 333 Adobe courses, 83 of them were PhotoShop-based. And as this documentary is a year old as of this post, there are definitely more than that now.
The depth of the PhotoShop courses highlight lynda.com’s key strength. PhotoShop is an insanely dense application in terms of features and functions. Lynda does a great job of trying to break up the density by offering courses on specific PhotoShop topics such as smart objects, selection methods and photo retouching. The InDesign, Ilustrator, Flash and other like courses cover their respected topics in the same way, but PhotoShop does it the best.
Front-end web developers also will benefit from Lynda. JavaScript, AJAX, and ActionScript fans will find more than enough content to keep them coming back to the site, ActionScript in particular. I’ve gone through two of the AS courses myself and was quire happy with them.
Who Will NOT Get The Most Out Of Lynda
While there are courses on more-structured programming and database development, there may not be enough to justify lynda.com’s subscription price if that’s all you want to learn.
Lynda does provide ASP.NET, PHP/MySQL and Ruby courses and the like. I went through courses for the first two subjects and definitely learned something but unlike Lynda’s PhotoShop setup, where I can finish one course and then hop onto another one, there are only a few courses that I can take after those. As far as hardcore programming goes, there are two iPhone SDK courses on lynda; so there’s some Objective-C offerings. There is, however, no C course which I, personally, would like to see.
It’s key to point out that Lynda most likely only offers courses on the most-requested topics. Since the site definitely attracts more designers than developers, it’s doubtful that a lot of requests for programming courses come in. And regarding database development, applications like WordPress, Joomla and Drupal (all of which have courses on Lynda) reduce the a designer’s need for back-end database developers (at least on a freelance level), so such courses may be a tad redundant. Plus, Lynda adds courses on all subjects with great frequency so more courses for the above-mentioned topics may be coming. Just know going in that as of now, there are a limited amount of courses on extensive web and software development on Lynda.com.
The Instructors and Lecturers
Top-notch on both counts.
Most of the Adobe-related courses are taught by Adobe Certified instructors. Past that, the AJAX course is taught by JavaScript uber-guru Dori Smith while search engine expert Jill Whalen’s SEO Optimization course was quite informative. All the course instructors knew exactly what they were talking about.
Lecture-wise, Lynda is pretty interesting. Most of their lectures are listed under the “Creative Inspiration” section, giving you an idea of their overall subject matter. Both Rick Smolan and Douglas Kirkland talk up photography quite succinctly. The lead illustrator of tokidoki, the cutting edge, Japanese-inspired lifestyle brand demonstrate their workflow. And music types will really enjoy lectures from the likes of DJ Jason Bentley and Devo frontman (and Yo Gabba Gabba regular) Mark Motherbaugh. The pleasant surprise for me was the graphic designer documentary directed by Hillman Curtis.
Price
On the individual level, Lynda offers both a monthly an annual subscription price. Each price structure offers two pricing tiers: one for just the courses and one for courses and the exercise files. My lynda.com experience convinced me that having the exercise files is a must, especially for the developer-related courses. If you’re on a budget, I’d suggest starting off with the monthly subscription with exercise files for $37.50. If you have the cash (and the time) go for the yearly subscription at $375.00.
If you’re still on the fence, take a free 7-day trial of Lynda.com.


Start a new working life and learn great habits!
Progress
Productivity
Weekly family time: {{familyTime}} Change family hours
Weekly family budget: {{familyBudget | currency}} Change family budget
Sleep
Exercise
Diet
Goals
Determination
{{ habitpower }} Habit Power ready to be invested
Store
Transportation Upgrade: {{transport}} for {{transPrice | currency}}
Home Upgrade: {{nextHome}} for {{homePrice | currency}}
Pay Taxes: {{tax | currency}}


{% extends 'wedding/sections/section.html' %} {% block content %}
Tony and Haya chose this venue for their wedding because they are most
excited about spending a whole weekend with everyone they love.
They want to maximize time with everyone and bring their community of
friends and family together. The wedding venue has four winterized
lodges that can accommodate guests. Haya and Tony will be staying
on-site all weekend, and encourage you to join them!
The lodge set-up and what’s included:
To make a reservation, call the hotel directly.
Group Name: Alzaid Lopez Wedding
Phone:<PHONE_NUMBER>
Address: 70 Pittsfield Road, Lenox, MA 01240
Room block available until November 15th, 2018
Standard King rooms at $129
Double Queen rooms at $139
Rates above are per night and do not include tax or breakfast
To make a reservation, call the hotel directly or click the link.
Group Name: “Alzaid/Lopez Wedding Block”
Group Code: ALW
Phone:<PHONE_NUMBER>
Link
Address: 445 Pittsfield Road, Lenox, MA 01240
Room block available until November 1st, 2018
Rates are per night and include breakfast
Standard King $109
Standard Queen $119
King Studio Suite $139
To make a reservation, call the hotel directly or click the link. If you are only booking a 1-night stay, you must call them directly and provide the same block code. If you are staying for two nights and would like to book online, here are the instructions:
The Yankee Suites is the sister hotel to the Yankee Inn. They allow
dogs for an additional $50 fee. To make a reservation, call the hotel
directly. It is recommended that you only stay here if you are
planning to bring a dog.
Phone:<PHONE_NUMBER>
https://www.extendedstays.net/en-us
Address: 20 W Housatonic St, Pittsfield, MA 01201
Room block available until November 15th, 2018
Group Code: 1214AL
Group Name: Alzaid-Lopez Wedding
Rate: $85 per night for Doubles or Queen with a mandatory two-night stay


Echo Test
This page will let you do an HTML5 WebSocket test against the TclHttpd Websocket echo server. It is a modified version of the Echo Test page from www.websocket.org
Try it out
This browser supports WebSocket.
Uh-oh, the browser you're using doesn't have native support for WebSocket.
The following link lists the browsers that support WebSocket:
Location:
Use secure WebSocket (TLS)
Message:
Use secure WebSocket (TLS)
Message:
Log:
Instructions:
| Step 1: | Press the Connect button. |
| Step 2: | Once connected, enter a message and press the Send button. The output will appear in the Log section. You can change the message and send again multiple times. |
| Step 3: | Press the Disconnect button. |
| Note: | In some environments the WebSocket connection may fail due to intermediary firewalls, proxies, routers, etc. In that case take advantage of WebSocket's secure capability and check Use secure WebSocket (TLS). This TclHttpd Webserver is not configured with TLS support. |


'I forgot about all the issues and just celebrated with fellow South Africans' - fans celebrate RWC win
by Alex MitchleyTears, cheers and what can only be described as exhilaration spread through the capital city on Saturday as the Springboks lifted the Web Ellis trophy.
South Africa dominated England in 2019 Rugby World Cup final in Yokohama, beating them 32-12.
Tries by wingers Makazole Mapimpi and Cheslin Kolbe closed the game out and sent Pretorians into overdrive.
Thousands of residents in the capital city gathered at different venues to view the game. One venue, next to Loftus Versveld Stadium, home of the Blue Bulls, was packed to the rafters.
Glued to the big screen a sea of green and gold backers were vocal about every point of play.
Every scrum, line break, line-out and kick was met with elation.
Every point registered on the scoreboard by the Springboks resulted in high fives and hugs between complete strangers.
Mava Kalolo, 22, said he felt the presence of an entire united South Africa at Loftus Park.
Kalolo was among many who became emotional as the final whistle blew.
"The win made me ecstatic. For a moment I forgot about all the issues and just celebrated with fellow South Africans," he told News24.
Matome Moloisi,28, said he knew South Africa would win, but wasn’t prepared for the celebrations afterwards.
"I’m so happy, I can’t even express it.”
Thando Gamnca, 34, said the win was a magical moment for all South Africans.
"[Siya] Kolisi and everyone made the nation proud. Everyone was behind the boys and the spirit could be felt," Gamnca said.
The celebrations spilled out of venues as many Pretorians took to the streets, people in cars hooting, people chanting as they walked on sidewalks was a common sight throughout eastern Pretoria.


Main API routines, including transparency support. More...
Data Structures | |
| struct | _dr_mem_info_t |
| union | _version_number_t |
| struct | _module_names_t |
| struct | _dr_os_version_info_t |
| struct | _module_segment_data_t |
| struct | _module_data_t |
| struct | _dr_export_info_t |
| struct | _tracedump_file_header_t |
| struct | _tracedump_trace_header_t |
| struct | _tracedump_stub_data |
Defines | |
| #define | DR_MEMPROT_NONE 0x00 |
| #define | DR_MEMPROT_READ 0x01 |
| #define | DR_MEMPROT_WRITE 0x02 |
| #define | DR_MEMPROT_EXEC 0x04 |
| #define | GLOBAL_DCONTEXT ((void *)-1) |
| #define | DR_ASSERT_MSG(x, msg) |
| #define | DR_ASSERT(x) DR_ASSERT_MSG(x, "") |
| #define | DR_TRY_EXCEPT(drcontext, try_statement, except_statement) |
| #define | DR_FILE_READ 0x1 |
| #define | DR_FILE_WRITE_REQUIRE_NEW 0x2 |
| #define | DR_FILE_WRITE_APPEND 0x4 |
| #define | DR_FILE_WRITE_OVERWRITE 0x8 |
| #define | DR_FILE_ALLOW_LARGE 0x10 |
| #define | DR_FILE_CLOSE_ON_FORK 0x20 |
| #define | DR_SEEK_SET 0 |
| #define | DR_SEEK_CUR 1 |
| #define | DR_SEEK_END 2 |
| #define | DR_MAP_PRIVATE 0x1 |
| #define | DR_MAP_FIXED 0x2 |
| #define | LOG_NONE 0x00000000 |
| #define | LOG_STATS 0x00000001 |
| #define | LOG_TOP 0x00000002 |
| #define | LOG_THREADS 0x00000004 |
| #define | LOG_SYSCALLS 0x00000008 |
| #define | LOG_ASYNCH 0x00000010 |
| #define | LOG_INTERP 0x00000020 |
| #define | LOG_EMIT 0x00000040 |
| #define | LOG_LINKS 0x00000080 |
| #define | LOG_CACHE 0x00000100 |
| #define | LOG_FRAGMENT 0x00000200 |
| #define | LOG_DISPATCH 0x00000400 |
| #define | LOG_MONITOR 0x00000800 |
| #define | LOG_HEAP 0x00001000 |
| #define | LOG_VMAREAS 0x00002000 |
| #define | LOG_SYNCH 0x00004000 |
| #define | LOG_MEMSTATS 0x00008000 |
| #define | LOG_OPTS 0x00010000 |
| #define | LOG_SIDELINE 0x00020000 |
| #define | LOG_SYMBOLS 0x00040000 |
| #define | LOG_RCT 0x00080000 |
| #define | LOG_NT 0x00100000 |
| #define | LOG_HOT_PATCHING 0x00200000 |
| #define | LOG_HTABLE 0x00400000 |
| #define | LOG_MODULEDB 0x00800000 |
| #define | LOG_ALL 0x00ffffff |
| #define | BB_ORIGIN_HEADER_SIZE (sizeof(app_pc)+sizeof(int)) |
| #define | STUB_DATA_FIXED_SIZE (offsetof(tracedump_stub_data_t, count)) |
Typedefs | |
| typedef void * | dr_auxlib_handle_t |
| typedef void(* | dr_auxlib_routine_ptr_t )() |
| typedef struct _dr_mem_info_t | dr_mem_info_t |
| typedef void * | module_handle_t |
| typedef union _version_number_t | version_number_t |
| typedef struct _module_names_t | module_names_t |
| typedef struct _dr_os_version_info_t | dr_os_version_info_t |
| typedef void * | dr_module_iterator_t |
| typedef struct _module_segment_data_t | module_segment_data_t |
| typedef struct _dr_export_info_t | dr_export_info_t |
| typedef struct _tracedump_file_header_t | tracedump_file_header_t |
| typedef struct _tracedump_trace_header_t | tracedump_trace_header_t |
| typedef struct _tracedump_stub_data | tracedump_stub_data_t |
Enumerations | |
| enum | dr_mem_type_t { DR_MEMTYPE_FREE, DR_MEMTYPE_IMAGE, DR_MEMTYPE_DATA } |
| enum | dr_os_version_t { , DR_WINDOWS_VERSION_2003 = 52 } |
Functions | |
| void * | dr_standalone_init (void) |
| bool | dr_using_all_private_caches (void) |
| void | dr_request_synchronized_exit (void) |
| const char * | dr_get_options (client_id_t client_id) |
| const char * | dr_get_client_path (client_id_t client_id) |
| byte * | dr_get_client_base (client_id_t client_id) |
| const char * | dr_get_application_name (void) |
| process_id_t | dr_get_process_id (void) |
| process_id_t | dr_get_parent_id (void) |
| bool | dr_get_os_version (dr_os_version_info_t *info) |
| bool | dr_is_wow64 (void) |
| void * | dr_get_app_PEB (void) |
| void | dr_get_time (dr_time_t *time) |
| uint64 | dr_get_milliseconds (void) |
| uint | dr_get_random_value (uint max) |
| void | dr_set_random_seed (uint seed) |
| uint | dr_get_random_seed (void) |
| void | dr_abort (void) |
| void * | dr_thread_alloc (void *drcontext, size_t size) |
| void | dr_thread_free (void *drcontext, void *mem, size_t size) |
| void * | dr_global_alloc (size_t size) |
| void | dr_global_free (void *mem, size_t size) |
| void * | dr_nonheap_alloc (size_t size, uint prot) |
| void | dr_nonheap_free (void *mem, size_t size) |
| void * | __wrap_malloc (size_t size) |
| void * | __wrap_realloc (void *mem, size_t size) |
| void * | __wrap_calloc (size_t nmemb, size_t size) |
| void | __wrap_free (void *mem) |
| bool | dr_memory_is_readable (const byte *pc, size_t size) |
| bool | dr_query_memory (const byte *pc, byte **base_pc, size_t *size, uint *prot) |
| bool | dr_query_memory_ex (const byte *pc, OUT dr_mem_info_t *info) |
| size_t | dr_virtual_query (const byte *pc, MEMORY_BASIC_INFORMATION *mbi, size_t mbi_size) |
| bool | dr_safe_read (const void *base, size_t size, void *out_buf, size_t *bytes_read) |
| bool | dr_safe_write (void *base, size_t size, const void *in_buf, size_t *bytes_written) |
| void | dr_try_setup (void *drcontext, void **try_cxt) |
| int | dr_try_start (void *buf) |
| void | dr_try_stop (void *drcontext, void *try_cxt) |
| bool | dr_memory_protect (void *base, size_t size, uint new_prot) |
| bool | dr_memory_is_dr_internal (const byte *pc) |
| bool | dr_memory_is_in_client (const byte *pc) |
| dr_auxlib_handle_t | dr_load_aux_library (const char *name, byte **lib_start, byte **lib_end) |
| dr_auxlib_routine_ptr_t | dr_lookup_aux_library_routine (dr_auxlib_handle_t lib, const char *name) |
| bool | dr_unload_aux_library (dr_auxlib_handle_t lib) |
| void * | dr_mutex_create (void) |
| void | dr_mutex_destroy (void *mutex) |
| void | dr_mutex_lock (void *mutex) |
| void | dr_mutex_unlock (void *mutex) |
| bool | dr_mutex_trylock (void *mutex) |
| bool | dr_mutex_self_owns (void *mutex) |
| void * | dr_rwlock_create (void) |
| void | dr_rwlock_destroy (void *rwlock) |
| void | dr_rwlock_read_lock (void *rwlock) |
| void | dr_rwlock_read_unlock (void *rwlock) |
| void | dr_rwlock_write_lock (void *rwlock) |
| void | dr_rwlock_write_unlock (void *rwlock) |
| bool | dr_rwlock_write_trylock (void *rwlock) |
| bool | dr_rwlock_self_owns_write_lock (void *rwlock) |
| void * | dr_recurlock_create (void) |
| void | dr_recurlock_destroy (void *reclock) |
| void | dr_recurlock_lock (void *reclock) |
| void | dr_recurlock_unlock (void *reclock) |
| bool | dr_recurlock_trylock (void *reclock) |
| bool | dr_recurlock_self_owns (void *reclock) |
| module_data_t * | dr_lookup_module (byte *pc) |
| module_data_t * | dr_lookup_module_by_name (const char *name) |
| dr_module_iterator_t * | dr_module_iterator_start (void) |
| bool | dr_module_iterator_hasnext (dr_module_iterator_t *mi) |
| module_data_t * | dr_module_iterator_next (dr_module_iterator_t *mi) |
| void | dr_module_iterator_stop (dr_module_iterator_t *mi) |
| module_data_t * | dr_copy_module_data (const module_data_t *data) |
| void | dr_free_module_data (module_data_t *data) |
| const char * | dr_module_preferred_name (const module_data_t *data) |
| bool | dr_lookup_module_section (module_handle_t lib, byte *pc, IMAGE_SECTION_HEADER *section_out) |
| generic_func_t | dr_get_proc_address (module_handle_t lib, const char *name) |
| bool | dr_get_proc_address_ex (module_handle_t lib, const char *name, dr_export_info_t *info OUT, size_t info_len) |
| reg_t | dr_syscall_get_param (void *drcontext, int param_num) |
| void | dr_syscall_set_param (void *drcontext, int param_num, reg_t new_value) |
| reg_t | dr_syscall_get_result (void *drcontext) |
| void | dr_syscall_set_result (void *drcontext, reg_t value) |
| void | dr_syscall_set_sysnum (void *drcontext, int new_num) |
| void | dr_syscall_invoke_another (void *drcontext) |
| bool | dr_create_dir (const char *fname) |
| bool | dr_directory_exists (const char *fname) |
| bool | dr_file_exists (const char *fname) |
| file_t | dr_open_file (const char *fname, uint mode_flags) |
| void | dr_close_file (file_t f) |
| bool | dr_rename_file (const char *src, const char *dst, bool replace) |
| bool | dr_delete_file (const char *filename) |
| void | dr_flush_file (file_t f) |
| ssize_t | dr_write_file (file_t f, const void *buf, size_t count) |
| ssize_t | dr_read_file (file_t f, void *buf, size_t count) |
| bool | dr_file_seek (file_t f, int64 offset, int origin) |
| int64 | dr_file_tell (file_t f) |
| file_t | dr_dup_file_handle (file_t f) |
| bool | dr_file_size (file_t fd, OUT uint64 *size) |
| void * | dr_map_file (file_t f, INOUT size_t *size, uint64 offs, app_pc addr, uint prot, uint flags) |
| bool | dr_unmap_file (void *map, size_t size) |
| void | dr_log (void *drcontext, uint mask, uint level, const char *fmt,...) |
| file_t | dr_get_logfile (void *drcontext) |
| bool | dr_is_notify_on (void) |
| file_t | dr_get_stdout_file (void) |
| file_t | dr_get_stderr_file (void) |
| file_t | dr_get_stdin_file (void) |
| void | dr_messagebox (const char *fmt,...) |
| void | dr_printf (const char *fmt,...) |
| void | dr_fprintf (file_t f, const char *fmt,...) |
| bool | dr_enable_console_printing (void) |
| bool | dr_using_console (void) |
| int | dr_snprintf (char *buf, size_t max, const char *fmt,...) |
| int | dr_vsnprintf (char *buf, size_t max, const char *fmt, va_list ap) |
| void | dr_print_instr (void *drcontext, file_t f, instr_t *instr, const char *msg) |
| void | dr_print_opnd (void *drcontext, file_t f, opnd_t opnd, const char *msg) |
| void * | dr_get_current_drcontext (void) |
| thread_id_t | dr_get_thread_id (void *drcontext) |
| void * | dr_get_tls_field (void *drcontext) |
| void | dr_set_tls_field (void *drcontext, void *value) |
| void * | dr_get_dr_segment_base (IN reg_id_t segment_register) |
| bool | dr_raw_tls_calloc (OUT reg_id_t *segment_register, OUT uint *offset, IN uint num_slots, IN uint alignment) |
| bool | dr_raw_tls_cfree (uint offset, uint num_slots) |
| bool | dr_create_client_thread (void(*func)(void *param), void *arg) |
| bool | dr_client_thread_set_suspendable (bool suspendable) |
| void | dr_sleep (int time_ms) |
| void | dr_thread_yield (void) |
| bool | dr_suspend_all_other_threads (OUT void ***drcontexts, OUT uint *num_suspended, OUT uint *num_unsuspended) |
| bool | dr_resume_all_other_threads (IN void **drcontexts, IN uint num_suspended) |
| bool | dr_set_itimer (int which, uint millisec, void(*func)(void *drcontext, dr_mcontext_t *mcontext)) |
| uint | dr_get_itimer (int which) |
| bool | dr_replace_fragment (void *drcontext, void *tag, instrlist_t *ilist) |
| bool | dr_delete_fragment (void *drcontext, void *tag) |
| bool | dr_flush_region (app_pc start, size_t size) |
| bool | dr_unlink_flush_region (app_pc start, size_t size) |
| bool | dr_delay_flush_region (app_pc start, size_t size, uint flush_id, void(*flush_completion_callback)(int flush_id)) |
| bool | dr_fragment_exists_at (void *drcontext, void *tag) |
| bool | dr_bb_exists_at (void *drcontext, void *tag) |
| uint | dr_fragment_size (void *drcontext, void *tag) |
| app_pc | dr_fragment_app_pc (void *tag) |
| app_pc | dr_app_pc_for_decoding (app_pc pc) |
| app_pc | dr_app_pc_from_cache_pc (byte *cache_pc) |
| bool | dr_using_app_state (void *drcontext) |
| void | dr_switch_to_app_state (void *drcontext) |
| void | dr_switch_to_dr_state (void *drcontext) |
| bool | dr_mark_trace_head (void *drcontext, void *tag) |
| bool | dr_trace_head_at (void *drcontext, void *tag) |
| bool | dr_trace_exists_at (void *drcontext, void *tag) |
Main API routines, including transparency support.
| #define BB_ORIGIN_HEADER_SIZE (sizeof(app_pc)+sizeof(int)) |
Size of tag + bb_code_size fields for each bb. tracedump_stub_data_t.stub_size will not exceed this value.
| #define DR_ASSERT | ( | x | ) | DR_ASSERT_MSG(x, "") |
If x
is false, displays a message about an assertion failure and then calls dr_abort()
| #define DR_ASSERT_MSG | ( | x, | |||
| msg | ) |
((void)((!(x)) ? \ (dr_messagebox("ASSERT FAILURE: %s:%d: %s (%s)", __FILE__, __LINE__, #x, msg),\ dr_abort(), 0) : 0))
If x
is false, displays a message about an assertion failure (appending msg
to the message) and then calls dr_abort()
| #define DR_FILE_ALLOW_LARGE 0x10 |
Open with large (>2GB) file support. Only applicable on 32-bit Linux.
| #define DR_FILE_CLOSE_ON_FORK 0x20 |
Linux-only. This file will be closed in the child of a fork.
| #define DR_FILE_READ 0x1 |
Open with read access.
| #define DR_FILE_WRITE_APPEND 0x4 |
Open with write access. If the file already exists, set the file position to the end of the file.
| #define DR_FILE_WRITE_OVERWRITE 0x8 |
Open with write access. If the file already exists, truncate the file to zero length.
| #define DR_FILE_WRITE_REQUIRE_NEW 0x2 |
Open with write access, but do not open if the file already exists.
| #define DR_MAP_FIXED 0x2 |
If set, indicates that the passed-in start address is required rather than a hint. On Linux, this has the same semantics as mmap with MAP_FIXED: i.e., any existing mapping in [addr,addr+size) will be unmapped. This flags is not supported on Windows.
| #define DR_MAP_PRIVATE 0x1 |
If set, changes to mapped memory are private to the mapping process and are not reflected in the underlying file. If not set, changes are visible to other processes that map the same file, and will be propagated to the file itself.
| #define DR_MEMPROT_EXEC 0x04 |
Execute privileges.
| #define DR_MEMPROT_NONE 0x00 |
No read, write, or execute privileges.
| #define DR_MEMPROT_READ 0x01 |
Read privileges.
| #define DR_MEMPROT_WRITE 0x02 |
Write privileges.
| #define DR_SEEK_CUR 1 |
current file position
| #define DR_SEEK_END 2 |
end of file
| #define DR_SEEK_SET 0 |
start of file
| #define DR_TRY_EXCEPT | ( | drcontext, | |||
| try_statement, | |||||
| except_statement | ) |
do {\ void *try_cxt; \ dr_try_setup(drcontext, &try_cxt); \ if (dr_try_start(try_cxt) == 0) { \ try_statement \ dr_try_stop(drcontext, try_cxt); \ } else { \ /* roll back first in case except faults or returns */ \ dr_try_stop(drcontext, try_cxt); \ except_statement \ } \ } while (0)
Simple try..except support for executing operations that might fault and recovering if they do. Be careful with this feature as it has some limitations:
For fault-free reads or writes in isolation, use dr_safe_read() or dr_safe_write() instead, although on Windows those operations invoke a system call and this construct can be more performant.
| #define GLOBAL_DCONTEXT ((void *)-1) |
Use this dcontext for use with the standalone static decoder library. Pass it whenever a decoding-related API routine asks for a context.
| #define LOG_ALL 0x00ffffff |
Log all data.
| #define LOG_ASYNCH 0x00000010 |
Log data related to signals/callbacks/etc.
| #define LOG_CACHE 0x00000100 |
Log data related to code cache management.
| #define LOG_DISPATCH 0x00000400 |
Log data on every context switch dispatch.
| #define LOG_EMIT 0x00000040 |
Log data related to emitting code.
| #define LOG_FRAGMENT 0x00000200 |
Log data related to app code fragments.
| #define LOG_HEAP 0x00001000 |
Log data related to memory management.
| #define LOG_HOT_PATCHING 0x00200000 |
Log data related to hot patching.
| #define LOG_HTABLE 0x00400000 |
Log data related to hash tables.
| #define LOG_INTERP 0x00000020 |
Log data related to app interpretation.
| #define LOG_LINKS 0x00000080 |
Log data related to linking code.
| #define LOG_MEMSTATS 0x00008000 |
Log data related to memory statistics.
| #define LOG_MODULEDB 0x00800000 |
Log data related to the module database.
| #define LOG_MONITOR 0x00000800 |
Log data related to trace building.
| #define LOG_NONE 0x00000000 |
Log no data.
| #define LOG_NT 0x00100000 |
Log data related to Windows Native API.
| #define LOG_OPTS 0x00010000 |
Log data related to optimizations.
| #define LOG_RCT 0x00080000 |
Log data related to indirect transfers.
| #define LOG_SIDELINE 0x00020000 |
Log data related to sideline threads.
| #define LOG_STATS 0x00000001 |
Log per-thread and global statistics.
| #define LOG_SYMBOLS 0x00040000 |
Log data related to app symbols.
| #define LOG_SYNCH 0x00004000 |
Log data related to synchronization.
| #define LOG_SYSCALLS 0x00000008 |
Log data related to system calls.
| #define LOG_THREADS 0x00000004 |
Log data related to threads.
| #define LOG_TOP 0x00000002 |
Log top-level information.
| #define LOG_VMAREAS 0x00002000 |
Log data related to address space regions.
| #define STUB_DATA_FIXED_SIZE (offsetof(tracedump_stub_data_t, count)) |
The last offset into tracedump_stub_data_t of always-present fields.
| typedef void* dr_auxlib_handle_t |
A handle to a loaded client auxiliary library. This is a different type than module_handle_t and is not necessarily the base address.
| typedef void(* dr_auxlib_routine_ptr_t)() |
An exported routine in a loaded client auxiliary library.
| typedef struct _dr_export_info_t dr_export_info_t |
Data structure used by dr_get_proc_address_ex() to retrieve information about an exported symbol.
| typedef struct _dr_mem_info_t dr_mem_info_t |
Describes a memory region. Used by dr_query_memory_ex().
| typedef void* dr_module_iterator_t |
For dr_module_iterator_* interface
| typedef struct _dr_os_version_info_t dr_os_version_info_t |
Data structure used with dr_get_os_version()
| typedef void* module_handle_t |
Type used for dr_get_proc_address(). This can be obtained from the _module_data_t structure. It is equivalent to the base address of the module on both Windows and Linux.
| typedef struct _module_names_t module_names_t |
Holds the names of a module. This structure contains multiple fields corresponding to different sources of a module name. Note that some of these names may not exist for certain modules. It is highly likely, however, that at least one name is available. Use dr_module_preferred_name() on the parent _module_data_t to get the preferred name of the module.
| typedef struct _module_segment_data_t module_segment_data_t |
Holds information on a segment of a loaded module.
| typedef struct _tracedump_file_header_t tracedump_file_header_t |
Binary trace dump format: the file starts with a tracedump_file_header_t then, for each trace: struct _tracedump_trace_header if num_bbs > 0 # tracedump_origins foreach bb: app_pc tag; int bb_code_size; byte code[bb_code_size]; endif foreach exit: struct _tracedump_stub_data if linkcount_size > 0 linkcount_type_t count; # sizeof == linkcount_size endif if separate from body (i.e., exit_stub < cache_start_pc || exit_stub >= cache_start_pc+code_size): byte stub_code[15]; # all separate stubs are 15 endif endfor byte code[code_size]; if the -tracedump_threshold option (deprecated) was specified: int num_below_treshold linkcount_type_t count_below_threshold endif
| typedef struct _tracedump_stub_data tracedump_stub_data_t |
The format of a stub in a trace dump file.
| typedef struct _tracedump_trace_header_t tracedump_trace_header_t |
Header for an individual trace in a binary trace dump file.
| typedef union _version_number_t version_number_t |
Used to hold .rsrc section version number information. This number is usually presented as p1.p2.p3.p4 by PE parsing tools.
| enum dr_mem_type_t |
Flags describing memory used by dr_query_memory_ex().
| enum dr_os_version_t |
| void* __wrap_calloc | ( | size_t | nmemb, | |
| size_t | size | |||
| ) |
Allocates memory from DR's global memory pool, but mimics the behavior of calloc. Memory must be freed with __wrap_free(). The __wrap routines are intended to be used with ld's -wrap option; see __wrap_malloc() for more information.
| void __wrap_free | ( | void * | mem | ) |
Frees memory from DR's global memory pool. Memory must have been allocated with __wrap_malloc(). The __wrap routines are intended to be used with ld's -wrap option; see __wrap_malloc() for more information.
| void* __wrap_malloc | ( | size_t | size | ) |
Allocates memory from DR's global memory pool, but mimics the behavior of malloc. Memory must be freed with __wrap_free(). The __wrap routines are intended to be used with ld's -wrap option to replace a client's use of malloc, realloc, and free with internal versions that allocate memory from DR's private pool. With -wrap, clients can link to libraries that allocate heap memory without interfering with application allocations.
| void* __wrap_realloc | ( | void * | mem, | |
| size_t | size | |||
| ) |
Reallocates memory from DR's global memory pool, but mimics the behavior of realloc. Memory must be freed with __wrap_free(). The __wrap routines are intended to be used with ld's -wrap option; see __wrap_malloc() for more information.
| void dr_abort | ( | void | ) |
Aborts the process immediately.
| app_pc dr_app_pc_for_decoding | ( | app_pc | pc | ) |
Given an application PC, returns a PC that contains the application code corresponding to the original PC. In some circumstances on Windows DR inserts a jump on top of the original code, which the client will not see in the bb and trace hooks due to DR replacing it there with the displaced original application code in order to present the client with an unmodified view of the application code. A client should use this routine when attempting to decode the original application instruction that caused a fault from the translated fault address, as the translated address may actually point in the middle of DR's jump.
| app_pc dr_app_pc_from_cache_pc | ( | byte * | cache_pc | ) |
Given a code cache pc, returns the corresponding application pc. This involves translating the state and thus may incur calls to the basic block and trace events (see dr_register_bb_event()). If translation fails, returns NULL.
| bool dr_bb_exists_at | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Returns true if a basic block with tag tag
exists in the code cache.
| bool dr_client_thread_set_suspendable | ( | bool | suspendable | ) |
Can only be called from a client thread: returns false if called from a non-client thread.
Controls whether a client thread created with dr_create_client_thread() will be suspended by DR for synchronization operations such as flushing or client requests like dr_suspend_all_other_threads(). A client thread that spends a lot of time holding locks can gain greater performance by not being suspended.
A client thread will be suspended for a thread termination operation, including at process exit, regardless of its suspendable requests.
| void dr_close_file | ( | file_t | f | ) |
Closes file f
.
| module_data_t* dr_copy_module_data | ( | const module_data_t * | data | ) |
Makes a copy of data
. Copy must be freed with dr_free_module_data(). Useful for making persistent copies of module_data_t's received as part of image load and unload event callbacks.
| bool dr_create_client_thread | ( | void(*)(void *param) | func, | |
| void * | arg | |||
| ) |
Creates a new thread that is marked as a non-application thread (i.e., DR will let it run natively and not execute its code from the code cache). The thread will terminate automatically simply by returning from func
; if running when the application terminates its last thread, the client thread will also terminate when DR shuts the process down.
Init and exit events will not be raised for this thread (instead simply place init and exit code in func
).
The new client thread has a drcontext that can be used for thread-private heap allocations. It has a stack of the same size as the DR stack used by application threads.
On Linux, this thread is guaranteed to have its own private itimer if dr_set_itimer() is called from it. However this does mean it will have its own process id.
A client thread should refrain from spending most of its time in calls to other libraries or making blocking or long-running system calls as such actions may incur performance or correctness problems with DR's synchronization engine, which needs to be able to suspend client threads at safe points and cannot determine whether the aforementioned actions are safe for suspension. Calling dr_sleep(), dr_thread_yield(), dr_messagebox(), or using DR's locks are safe. If a client thread spends a lot of time holding locks, consider marking it as un-suspendable by calling dr_client_thread_set_suspendable() for better performance.
Client threads, whether suspendable or not, must never execute from the code cache as the underlying fragments might be removed by another thread.
| bool dr_create_dir | ( | const char * | fname | ) |
Creates a new directory. Fails if the directory already exists or if it can't be created.
| bool dr_delay_flush_region | ( | app_pc | start, | |
| size_t | size, | |||
| uint | flush_id, | |||
| void(*)(int flush_id) | flush_completion_callback | |||
| ) |
Request a flush of all fragments containing code from the region [start
, start
+ size
). The flush will be performed at the next safe point in time (usually before any new code is added to the cache after this routine is called). If flush_completion_callback
is non-NULL, it will be called with the flush_id
provided to this routine when the flush completes, after which no execution will occur out of the fragments flushed. Returns true if the flush was successfully queued.
size
== 1 to flush fragments containing the instruction at address start
. A flush of size
== 0 is not allowed. flush_completion_callback
; for most performant usage set flush_completion_callback
to NULL. | bool dr_delete_file | ( | const char * | filename | ) |
Deletes the file referred to by filename
. Returns true if successful. On both Linux and Windows, if filename refers to a symlink, the symlink will be deleted and not the target of the symlink. On Windows, this will fail to delete any file was not opened with FILE_SHARE_DELETE and is still open.
| bool dr_delete_fragment | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Deletes the fragment with tag tag
. This routine is only valid with the -thread_private option; it deletes the fragment in the current thread only. After deletion, the existing fragment is allowed to complete execution. For example, a clean call deleting the currently executing fragment will safely return to the existing code. Subsequent executions will cause DynamoRIO to reconstruct the fragment, and therefore call the appropriate fragment-creation event hook, if registered.
drcontext
must be from the current thread and must be the drcontext used to create the instruction list.| bool dr_directory_exists | ( | const char * | fname | ) |
Checks for the existence of a directory.
| file_t dr_dup_file_handle | ( | file_t | f | ) |
Returns a new copy of the file handle f
. Returns INVALID_FILE on error.
| bool dr_enable_console_printing | ( | void | ) |
Enables dr_printf() and dr_fprintf() to work with a console window (viz., cmd
). Loads a private copy of kernel32.dll (if not already loaded) in order to accomplish this. To keep the default DR lean and mean, loading kernel32.dll is not performed by default.
This routine must be called during client initialization (dr_init()
). If called later, it will fail.
Without calling this routine, dr_printf() and dr_fprintf() will not print anything in a console window.
Even after calling this routine, there are significant limitations to console printing support in DR:
These limitations stem from the complex arrangement of the console window in Windows, where printing to it involves sending a message in an undocumented format to the csrss
process, rather than a simple write to a file handle. We recommend using a terminal window such as cygwin's rxvt
rather than the cmd
window, or alternatively redirecting all output to a file, which will solve all of the above limitations.
Returns whether successful.
| bool dr_file_exists | ( | const char * | fname | ) |
Checks the existence of a file.
| bool dr_file_seek | ( | file_t | f, | |
| int64 | offset, | |||
| int | origin | |||
| ) |
Sets the current file position for file f
to offset
bytes from the specified origin, where origin
is one of the DR_SEEK_* values. Returns true if successful.
| bool dr_file_size | ( | file_t | fd, | |
| OUT uint64 * | size | |||
| ) |
Determines the size of the file fd
. On success, returns the size in size
.
| int64 dr_file_tell | ( | file_t | f | ) |
Returns the current position for the file f
in bytes from the start of the file. Returns -1 on an error.
| void dr_flush_file | ( | file_t | f | ) |
Flushes any buffers for file f
.
| bool dr_flush_region | ( | app_pc | start, | |
| size_t | size | |||
| ) |
Flush all fragments containing any code from the region [start
, start
+ size
). Once this routine returns no execution will occur out of the fragments flushed. This routine may only be called during a clean call from the cache, from a nudge event handler, or from a pre- or post-system call event handler. It may not be called from any other event callback. No locks can held when calling this routine. If called from a clean call, caller can NOT return to the cache (the fragment that was called out of may have been flushed even if it doesn't apparently overlap the flushed region). Instead the caller must call dr_redirect_execution() after this routine to continue execution. Returns true if successful.
size
== 1 to flush fragments containing the instruction at address start
. A flush of size
== 0 is not allowed.| void dr_fprintf | ( | file_t | f, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Printing to a file that won't interfere with the application's own printing. Currently non-buffered.
cmd
window unless dr_enable_console_printing() is called ahead of time, and even then there are limitations: see dr_enable_console_printing(). | app_pc dr_fragment_app_pc | ( | void * | tag | ) |
Retrieves the application PC of a fragment with tag tag
.
| bool dr_fragment_exists_at | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Returns whether or not there is a fragment in code cache with tag tag
.
| uint dr_fragment_size | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Looks up the fragment with tag tag
. If not found, returns 0. If found, returns the total size occupied in the cache by the fragment.
| void dr_free_module_data | ( | module_data_t * | data | ) |
Frees a module_data_t returned by dr_module_iterator_next(), dr_lookup_module(), dr_lookup_module_by_name(), or dr_copy_module_data().
| void* dr_get_app_PEB | ( | void | ) |
Returns a pointer to the application's Process Environment Block (PEB). DR swaps to a private PEB when running client code, in order to isolate the client and its dependent libraries from the application, so conventional methods of reading the PEB will obtain the private PEB instead of the application PEB.
| const char* dr_get_application_name | ( | void | ) |
Returns the image name (without path) of the current application.
| byte* dr_get_client_base | ( | client_id_t | client_id | ) |
Returns the base address of the client library. client_id
is the client ID passed to a client's dr_init() function.
| const char* dr_get_client_path | ( | client_id_t | client_id | ) |
Returns the client library name and path that were originally specified to load the library. If the resulting string is longer than MAXIMUM_PATH it will be truncated. client_id
is the client ID passed to a client's dr_init() function.
| void* dr_get_current_drcontext | ( | void | ) |
Returns the DR context of the current thread.
| void* dr_get_dr_segment_base | ( | IN reg_id_t | segment_register | ) |
Get DR's segment base pointed at segment_register
. It can be used to get the base of thread-local storage segment used by dr_raw_tls_calloc.
| uint dr_get_itimer | ( | int | which | ) |
If an interval timer is already installed in the itimer sharing group that contains the calling thread, returns its frequency. Else returns 0.
| [in] | which | Must be one of ITIMER_REAL, ITIMER_VIRTUAL, or ITIMER_PROF |
| file_t dr_get_logfile | ( | void * | drcontext | ) |
Returns the log file for the thread with drcontext drcontext
. If drcontext
is NULL, returns the main log file.
| uint64 dr_get_milliseconds | ( | void | ) |
On Linux, returns the number of milliseconds since the Epoch (Jan 1, 1970). On Windows, returns the number of milliseconds since Jan 1, 1600 (this is the current UTC time).
| const char* dr_get_options | ( | client_id_t | client_id | ) |
Returns the client-specific option string specified at client registration. client_id
is the client ID passed to dr_init().
| bool dr_get_os_version | ( | dr_os_version_info_t * | info | ) |
Returns information about the version of the operating system. Returns whether successful.
| process_id_t dr_get_parent_id | ( | void | ) |
Returns the process id of the parent of the current process.
| generic_func_t dr_get_proc_address | ( | module_handle_t | lib, | |
| const char * | name | |||
| ) |
Returns the entry point of the exported function with the given name in the module with the given base. Returns NULL on failure.
| bool dr_get_proc_address_ex | ( | module_handle_t | lib, | |
| const char * | name, | |||
| dr_export_info_t *info | OUT, | |||
| size_t | info_len | |||
| ) |
Returns information in info
about the symbol name
exported by the module lib
. Returns false if the symbol is not found.
| process_id_t dr_get_process_id | ( | void | ) |
Returns the process id of the current process.
| uint dr_get_random_seed | ( | void | ) |
Returns the seed used for dr_get_random_value().
| uint dr_get_random_value | ( | uint | max | ) |
Returns a pseudo-random number in the range [0..max). The pseudo-random sequence can be repeated by passing the seed used during a run to the next run via the -prng_seed runtime option.
| file_t dr_get_stderr_file | ( | void | ) |
Returns a handle to stderr.
| file_t dr_get_stdin_file | ( | void | ) |
Returns a handle to stdin.
| file_t dr_get_stdout_file | ( | void | ) |
Returns a handle to stdout.
| thread_id_t dr_get_thread_id | ( | void * | drcontext | ) |
Returns the thread id of the thread with drcontext drcontext
.
| void dr_get_time | ( | dr_time_t * | time | ) |
Retrieves the current time.
| void* dr_get_tls_field | ( | void * | drcontext | ) |
Returns the user-controlled thread-local-storage field. To generate an instruction sequence that reads the drcontext field inline in the code cache, use dr_insert_read_tls_field().
| void* dr_global_alloc | ( | size_t | size | ) |
Allocates size
bytes of memory from DR's global memory pool.
| void dr_global_free | ( | void * | mem, | |
| size_t | size | |||
| ) |
Frees memory allocated by dr_global_alloc(). size
must be the same as that passed to dr_global_alloc().
| bool dr_is_notify_on | ( | void | ) |
Returns true iff the -stderr_mask runtime option is non-zero, indicating that the user wants notification messages printed to stderr.
| bool dr_is_wow64 | ( | void | ) |
Returns true if this process is a 32-bit process operating on a 64-bit Windows kernel, known as Windows-On-Windows-64, or WOW64. Returns false otherwise.
| dr_auxlib_handle_t dr_load_aux_library | ( | const char * | name, | |
| byte ** | lib_start, | |||
| byte ** | lib_end | |||
| ) |
Loads the library with the given path as an auxiliary client library. The library is not treated as an application module but as an extension of DR. The library will be included in dr_memory_is_in_client() and any faults in the library will be considered client faults. The bounds of the loaded library are returned in the optional out variables. On failure, returns NULL.
| void dr_log | ( | void * | drcontext, | |
| uint | mask, | |||
| uint | level, | |||
| const char * | fmt, | |||
| ... | ||||
| ) |
Writes to DR's log file for the thread with drcontext drcontext
if the current loglevel is >= level
and the current logmask
& mask
!= 0. The mask constants are below. Logging is disabled for the release build. If drcontext
is NULL, writes to the main log file.
| dr_auxlib_routine_ptr_t dr_lookup_aux_library_routine | ( | dr_auxlib_handle_t | lib, | |
| const char * | name | |||
| ) |
Looks up the exported routine with the given name in the given client auxiliary library loaded by dr_load_aux_library(). Returns NULL on failure.
| module_data_t* dr_lookup_module | ( | byte * | pc | ) |
Looks up the module containing pc
. If a module containing pc
is found returns a module_data_t describing that module else returns NULL. Can be used to obtain a module_handle_t for dr_lookup_module_section().
| module_data_t* dr_lookup_module_by_name | ( | const char * | name | ) |
Looks up the module with name name
ignoring case. If an exact name match is found returns a module_data_t describing that module else returns NULL. User must call dr_free_module_data() on the returned module_data_t once finished. Can be used to obtain a module_handle_t for dr_get_proc_address().
| bool dr_lookup_module_section | ( | module_handle_t | lib, | |
| byte * | pc, | |||
| IMAGE_SECTION_HEADER * | section_out | |||
| ) |
Returns whether pc
is within a section within the module in section_found
and information about that section in section_out
.
| void* dr_map_file | ( | file_t | f, | |
| INOUT size_t * | size, | |||
| uint64 | offs, | |||
| app_pc | addr, | |||
| uint | prot, | |||
| uint | flags | |||
| ) |
Memory-maps size
bytes starting at offset offs
from the file f
at address addr
with privileges prot
.
| [in] | f | The file to map. |
| [in,out] | size | The requested size to map. Upon successful return, contains the actual mapped size. |
| [in] | offs | The offset within the file at which to start the map. |
| [in] | addr | The requested start address of the map. Unless fixed is true, this is just a hint and may not be honored. |
| [in] | prot | The access privileges of the mapping, composed of the DR_MEMPROT_READ, DR_MEMPROT_WRITE, and DR_MEMPROT_EXEC bits. |
| [in] | flags | Optional DR_MAP_* flags. |
| bool dr_mark_trace_head | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Marks the fragment associated with tag tag
as a trace head. The fragment need not exist yet -- once it is created it will be marked as a trace head.
DR associates a counter with a trace head and once it passes the -hot_threshold parameter, DR begins building a trace. Before each fragment is added to the trace, DR calls the client's end_trace callback to determine whether to end the trace. (The callback will be called both for standard DR traces and for client-defined traces.)
Returns true if the target fragment is marked as a trace head.
| bool dr_memory_is_dr_internal | ( | const byte * | pc | ) |
Returns true iff pc is memory allocated by DR for its own purposes, and would not exist if the application were run natively.
| bool dr_memory_is_in_client | ( | const byte * | pc | ) |
Returns true iff pc is located inside a client library.
| bool dr_memory_is_readable | ( | const byte * | pc, | |
| size_t | size | |||
| ) |
Checks to see that all bytes with addresses in the range [pc
, pc
+ size
- 1] are readable and that reading from that range won't generate an exception (see also dr_safe_read() and DR_TRY_EXCEPT()).
| bool dr_memory_protect | ( | void * | base, | |
| size_t | size, | |||
| uint | new_prot | |||
| ) |
Modifies the memory protections of the region from start
through start
+ size
. Modification of memory allocated by DR or of the DR or client libraries themselves is allowed under the assumption that the client knows what it is doing. Modification of the ntdll.dll library on Windows is not allowed. Returns true if successful.
| void dr_messagebox | ( | const char * | fmt, | |
| ... | ||||
| ) |
Displays a message in a pop-up window.
| bool dr_module_iterator_hasnext | ( | dr_module_iterator_t * | mi | ) |
Returns true if there is another loaded module in the iterator.
| module_data_t* dr_module_iterator_next | ( | dr_module_iterator_t * | mi | ) |
Retrieves the module_data_t for the next loaded module in the iterator. User must call dr_free_module_data() on the returned module_data_t once finished.
| dr_module_iterator_t* dr_module_iterator_start | ( | void | ) |
Initialize a new module iterator. The returned module iterator contains a snapshot of the modules loaded at the time it was created. Use dr_module_iterator_hasnext() and dr_module_iterator_next() to walk the loaded modules. Call dr_module_iterator_stop() when finished to release the iterator.
| void dr_module_iterator_stop | ( | dr_module_iterator_t * | mi | ) |
User should call this routine to free the module iterator.
| const char* dr_module_preferred_name | ( | const module_data_t * | data | ) |
Returns the preferred name for the module described by data
from data->module_names
.
| void* dr_mutex_create | ( | void | ) |
Initializes a mutex.
Warning: there are restrictions on when DR-provided mutexes, and locks in general, can be held by a client: no lock should be held while application code is executing in the code cache. Locks can be used while inside client code reached from clean calls out of the code cache, but they must be released before returning to the cache. Failing to follow these restrictions can lead to deadlocks.
| void dr_mutex_destroy | ( | void * | mutex | ) |
Deletes mutex
.
| void dr_mutex_lock | ( | void * | mutex | ) |
Locks mutex
. Waits until the mutex is successfully held.
| bool dr_mutex_self_owns | ( | void * | mutex | ) |
Returns true iff mutex
is owned by the calling thread. This routine is only available in debug builds. In release builds it always returns true.
| bool dr_mutex_trylock | ( | void * | mutex | ) |
Tries once to lock mutex
, returns whether or not successful.
| void dr_mutex_unlock | ( | void * | mutex | ) |
Unlocks mutex
. Asserts that mutex is currently locked.
| void* dr_nonheap_alloc | ( | size_t | size, | |
| uint | prot | |||
| ) |
Allocates size
bytes of memory as a separate allocation from DR's heap, allowing for separate protection. The prot
protection should use the DR_MEMPROT_READ, DR_MEMPROT_WRITE, and DR_MEMPROT_EXEC bits. When creating a region to hold dynamically generated code, use this routine in order to create executable memory.
| void dr_nonheap_free | ( | void * | mem, | |
| size_t | size | |||
| ) |
Frees memory allocated by dr_nonheap_alloc(). size
must be the same as that passed to dr_nonheap_alloc().
| file_t dr_open_file | ( | const char * | fname, | |
| uint | mode_flags | |||
| ) |
Opens the file fname
. If no such file exists then one is created. The file access mode is set by the mode_flags
argument which is drawn from the DR_FILE_* defines ORed together. Returns INVALID_FILE if unsuccessful.
On Windows, fname
must be an absolute path (when using Windows system calls directly there is no such thing as a relative path. On Windows the notions of current directory and relative paths are limited to user space via the Win32 API. We may add limited support for using the same current directory via Issue 298.)
On Linux, the file descriptor will be marked as close-on-exec. The DR_FILE_CLOSE_ON_FORK flag can be used to automatically close a file on a fork.
| void dr_print_instr | ( | void * | drcontext, | |
| file_t | f, | |||
| instr_t * | instr, | |||
| const char * | msg | |||
| ) |
Prints msg
followed by the instruction instr
to file f
.
| void dr_print_opnd | ( | void * | drcontext, | |
| file_t | f, | |||
| opnd_t | opnd, | |||
| const char * | msg | |||
| ) |
Prints msg
followed by the operand opnd
to file f
.
| void dr_printf | ( | const char * | fmt, | |
| ... | ||||
| ) |
Stdout printing that won't interfere with the application's own printing. Currently non-buffered.
cmd
window unless dr_enable_console_printing() is called ahead of time, and even then there are limitations: see dr_enable_console_printing(). | bool dr_query_memory | ( | const byte * | pc, | |
| byte ** | base_pc, | |||
| size_t * | size, | |||
| uint * | prot | |||
| ) |
An os neutral method for querying a memory address. Returns true iff a memory region containing pc
is found. If found additional information about the memory region is returned in the optional out arguments base_pc
, size
, and prot
where base_pc
is the start address of the memory region continaing pc
, size
is the size of said memory region and prot
is an ORed combination of DR_MEMPROT_* flags describing its current protection.
| bool dr_query_memory_ex | ( | const byte * | pc, | |
| OUT dr_mem_info_t * | info | |||
| ) |
Provides additional information beyond dr_query_memory(). Returns true if it was able to obtain information (including about free regions) and sets the fields of info
. This routine can be used to iterate over the entire address space. Returns false on failure.
| bool dr_raw_tls_calloc | ( | OUT reg_id_t * | segment_register, | |
| OUT uint * | offset, | |||
| IN uint | num_slots, | |||
| IN uint | alignment | |||
| ) |
Allocates num_slots
contiguous thread-local storage slots that can be directly accessed via an offset from segment_register
. These slots will be initialized to 0 for each new thread. The slot offsets are [offset
.. offset
+ (num_slots - 1)]. These slots are disjoint from the dr_spill_slot_t register spill slots and the client tls field (dr_get_tls_field()). Returns whether or not the slots were successfully obtained. The segment base pointed at segment_register
can be obtained using dr_get_dr_segment_base.
| bool dr_raw_tls_cfree | ( | uint | offset, | |
| uint | num_slots | |||
| ) |
Frees num_slots
raw thread-local storage slots starting at offset offset
that were allocated with dr_raw_tls_calloc(). Returns whether or not the slots were successfully freed.
| ssize_t dr_read_file | ( | file_t | f, | |
| void * | buf, | |||
| size_t | count | |||
| ) |
Reads up to count
bytes from file f
into buf
. Returns the actual number read.
| void* dr_recurlock_create | ( | void | ) |
Creates and initializes a recursive lock. A recursive lock allows the same thread to acquire it multiple times. The lock restrictions for mutexes apply (see dr_mutex_create()).
| void dr_recurlock_destroy | ( | void * | reclock | ) |
Deletes reclock
.
| void dr_recurlock_lock | ( | void * | reclock | ) |
Acquires reclock
, or increments the ownership count if already owned.
| bool dr_recurlock_self_owns | ( | void * | reclock | ) |
Returns whether the calling thread owns reclock
.
| bool dr_recurlock_trylock | ( | void * | reclock | ) |
Tries once to acquire reclock
and returns whether successful.
| void dr_recurlock_unlock | ( | void * | reclock | ) |
Decrements the ownership count of reclock
and releases if zero.
| bool dr_rename_file | ( | const char * | src, | |
| const char * | dst, | |||
| bool | replace | |||
| ) |
Renames the file src
to dst
, replacing an existing file named dst
if replace
is true. Atomic if src
and dst
are on the same filesystem. Returns true if successful.
| bool dr_replace_fragment | ( | void * | drcontext, | |
| void * | tag, | |||
| instrlist_t * | ilist | |||
| ) |
Replaces the fragment with tag tag
with the instructions in ilist
. This routine is only valid with the -thread_private option; it replaces the fragment for the current thread only. After replacement, the existing fragment is allowed to complete if currently executing. For example, a clean call replacing the currently executing fragment will safely return to the existing code. Subsequent executions will use the new instructions.
ilist
and all responsibility for deleting it. The client should not keep, use, or reference, the instrlist or any of the instrs it contains after passing.drcontext
must be from the current thread and must be the drcontext used to create the instruction list.| void dr_request_synchronized_exit | ( | void | ) |
| bool dr_resume_all_other_threads | ( | IN void ** | drcontexts, | |
| IN uint | num_suspended | |||
| ) |
May only be used after invoking dr_suspend_all_other_threads(). This routine resumes the threads that were suspended by dr_suspend_all_other_threads() and must be passed the same array and count of suspended threads that were returned by dr_suspend_all_other_threads(). It also frees the drcontexts
array and releases the locks acquired by dr_suspend_all_other_threads(). The return value indicates whether all resumption attempts were successful.
| void* dr_rwlock_create | ( | void | ) |
Creates and initializes a read-write lock. A read-write lock allows multiple readers or alternatively a single writer. The lock restrictions for mutexes apply (see dr_mutex_create()).
| void dr_rwlock_destroy | ( | void * | rwlock | ) |
Deletes rwlock
.
| void dr_rwlock_read_lock | ( | void * | rwlock | ) |
Acquires a read lock on rwlock
.
| void dr_rwlock_read_unlock | ( | void * | rwlock | ) |
Releases a read lock on rwlock
.
| bool dr_rwlock_self_owns_write_lock | ( | void * | rwlock | ) |
Returns whether the calling thread owns the write lock on rwlock
.
| void dr_rwlock_write_lock | ( | void * | rwlock | ) |
Acquires a write lock on rwlock
.
| bool dr_rwlock_write_trylock | ( | void * | rwlock | ) |
Tries once to acquire a write lock on rwlock
and returns whether successful.
| void dr_rwlock_write_unlock | ( | void * | rwlock | ) |
Releases a write lock on rwlock
.
| bool dr_safe_read | ( | const void * | base, | |
| size_t | size, | |||
| void * | out_buf, | |||
| size_t * | bytes_read | |||
| ) |
Safely reads size
bytes from address base
into buffer out_buf
. Reading is done without the possibility of an exception occurring. Optionally returns the actual number of bytes copied into bytes_read
. Returns true if successful.
| bool dr_safe_write | ( | void * | base, | |
| size_t | size, | |||
| const void * | in_buf, | |||
| size_t * | bytes_written | |||
| ) |
Safely writes size
bytes from buffer in_buf
to address base
. Writing is done without the possibility of an exception occurring. Optionally returns the actual number of bytes copied into bytes_written
. Returns true if successful.
| bool dr_set_itimer | ( | int | which, | |
| uint | millisec, | |||
| void(*)(void *drcontext, dr_mcontext_t *mcontext) | func | |||
| ) |
Installs an interval timer in the itimer sharing group that contains the calling thread.
| [in] | which | Must be one of ITIMER_REAL, ITIMER_VIRTUAL, or ITIMER_PROF |
| [in] | millisec | The frequency of the timer, in milliseconds. Passing 0 disables the timer. |
| [in] | func | The function that will be called each time the timer fires. It will be passed the context of the thread that received the itimer signal and its machine context, which has not been translated and so may contain raw code cache values. The function will be called from a signal handler that may have interrupted a lock holder or other critical code, so it must be careful in its operations: keep it as simple as possible, and avoid lock usage or I/O operations. If a general timer that does not interrupt client code is required, the client should create a separate thread via dr_create_client_thread() (which is guaranteed to have a private itimer) and set the itimer there, where the callback function can perform more operations safely if that new thread never acquires locks in its normal operation. |
Itimer sharing varies by kernel. Prior to 2.6.12 itimers were thread-private; after 2.6.12 they are shared across a thread group, though there could be multiple thread groups in one address space. The dr_get_itimer() function can be used to see whether a thread already has an itimer in its group to avoid re-setting an itimer set by an earlier thread. A client thread created by dr_create_client_thread() is guaranteed to not share its itimers with application threads.
The itimer will operate successfully in the presence of an application itimer of the same type.
The return value indicates whether the timer was successfully installed (or uninstalled if 0 was passed for millisec
).
| void dr_set_random_seed | ( | uint | seed | ) |
Sets the seed used for dr_get_random_value(). Generally this would only be called during client initialization.
| void dr_set_tls_field | ( | void * | drcontext, | |
| void * | value | |||
| ) |
Sets the user-controlled thread-local-storage field. To generate an instruction sequence that reads the drcontext field inline in the code cache, use dr_insert_write_tls_field().
| void dr_sleep | ( | int | time_ms | ) |
Current thread sleeps for time_ms
milliseconds.
| int dr_snprintf | ( | char * | buf, | |
| size_t | max, | |||
| const char * | fmt, | |||
| ... | ||||
| ) |
Utility routine to print a formatted message to a string. Will not print more than max characters. If successful, returns the number of characters printed, not including the terminating null character. If the number of characters to write equals max, then the caller is responsible for supplying a terminating null character. If the number of characters to write exceeds max, then max characters are written and -1 is returned. If an error occurs, a negative value is returned.
| void* dr_standalone_init | ( | void | ) |
Creates a DR context that can be used in a standalone program.
| bool dr_suspend_all_other_threads | ( | OUT void *** | drcontexts, | |
| OUT uint * | num_suspended, | |||
| OUT uint * | num_unsuspended | |||
| ) |
Suspends all other threads in the process and returns an array of contexts in drcontexts
with one context per successfully suspended threads. The contexts can be passed to routines like dr_get_thread_id() or dr_get_mcontext(). However, the contexts may not be modified: dr_set_mcontext() is not supported. dr_get_mcontext() can be called on the caller of this routine, unless in a Windows nudge callback.
The number of successfully suspended threads, which is also the length of the drcontexts
array, is returned in num_suspended
, which is a required parameter. The number of un-successfully suspended threads, if any, is returned in the optional parameter num_unsuspended
. The calling thread is not considered in either count. DR can fail to suspend a thread for privilege reasons (e.g., on Windows in a low-privilege process where another process injected a thread). This function returns true iff all threads were suspended, in which case num_unsuspended
will be 0.
The caller must invoke dr_resume_all_other_threads() in order to resume the suspended threads, free the drcontexts
array, and release coarse-grain locks that prevent new threads from being created.
This routine may not be called from any registered event callback other than the nudge event or the pre- or post-system call event. It may be called from clean calls out of the cache. This routine may not be called while any locks are held that could block a thread processing a registered event callback or cache callout.
| void dr_switch_to_app_state | ( | void * | drcontext | ) |
Swaps to the application version of any system state for the given thread. This is meant to be used prior to examining application memory, when private libraries are in use and there are two versions of system state. Invoking non-DR library routines while the application state is in place can lead to unpredictable results: call dr_switch_to_dr_state() before doing so.
| void dr_switch_to_dr_state | ( | void * | drcontext | ) |
Should only be called after calling dr_switch_to_app_state(). Swaps from the application version of system state for the given thread back to the DR and client version.
| reg_t dr_syscall_get_param | ( | void * | drcontext, | |
| int | param_num | |||
| ) |
Usable only from a pre-syscall (dr_register_pre_syscall_event()) event. Returns the value of system call parameter number param_num
.
| reg_t dr_syscall_get_result | ( | void * | drcontext | ) |
Usable only from a post-syscall (dr_register_post_syscall_event()) event. Returns the return value of the system call that will be presented to the application.
| void dr_syscall_invoke_another | ( | void * | drcontext | ) |
Usable only from a post-syscall (dr_register_post_syscall_event()) event. An additional system call will be invoked immediately, using the current values of the parameters, which can be set with dr_syscall_set_param(). The system call to be invoked should be specified with dr_syscall_set_sysnum().
Use this routine with caution. Especially on Windows, care must be taken if the application is expected to continue afterward. When system call parameters are stored on the stack, modifying them can result in incorrect application behavior, particularly when setting more parameters than were present in the original system call, which will result in corruption of the application stack.
On Windows, when the first system call is interruptible (alertable), the additional system call may be delayed.
DR will set key registers such as r10 for 64-bit or xdx for sysenter or WOW64 system calls. However, DR will not set ecx for WOW64; that is up to the client.
| void dr_syscall_set_param | ( | void * | drcontext, | |
| int | param_num, | |||
| reg_t | new_value | |||
| ) |
Usable only from a pre-syscall (dr_register_pre_syscall_event()) event, or from a post-syscall (dr_register_post_syscall_event()) event when also using dr_syscall_invoke_another(). Sets the value of system call parameter number param_num
to new_value
.
| void dr_syscall_set_result | ( | void * | drcontext, | |
| reg_t | value | |||
| ) |
Usable only from a pre-syscall (dr_register_pre_syscall_event()) or post-syscall (dr_register_post_syscall_event()) event. For pre-syscall, should only be used when skipping the system call. This sets the return value of the system call that the application sees to value
.
| void dr_syscall_set_sysnum | ( | void * | drcontext, | |
| int | new_num | |||
| ) |
Usable only from a pre-syscall (dr_register_pre_syscall_event()) event, or from a post-syscall (dr_register_post_syscall_event()) event when also using dr_syscall_invoke_another(). Sets the system call number of the system call about to be invoked to new_num
.
| void* dr_thread_alloc | ( | void * | drcontext, | |
| size_t | size | |||
| ) |
Allocates size
bytes of memory from DR's memory pool specific to the thread associated with drcontext
.
| void dr_thread_free | ( | void * | drcontext, | |
| void * | mem, | |||
| size_t | size | |||
| ) |
Frees thread-specific memory allocated by dr_thread_alloc(). size
must be the same as that passed to dr_thread_alloc().
| void dr_thread_yield | ( | void | ) |
Current thread gives up its time quantum.
| bool dr_trace_exists_at | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Checks to see that if there is a trace in the code cache at tag tag
.
| bool dr_trace_head_at | ( | void * | drcontext, | |
| void * | tag | |||
| ) |
Checks to see if the fragment (or future fragment) with tag tag
is marked as a trace head.
| void dr_try_setup | ( | void * | drcontext, | |
| void ** | try_cxt | |||
| ) |
Do not call this directly: use the DR_TRY_EXCEPT macro instead.
| int dr_try_start | ( | void * | buf | ) |
Do not call this directly: use the DR_TRY_EXCEPT macro instead.
| void dr_try_stop | ( | void * | drcontext, | |
| void * | try_cxt | |||
| ) |
Do not call this directly: use the DR_TRY_EXCEPT macro instead.
| bool dr_unlink_flush_region | ( | app_pc | start, | |
| size_t | size | |||
| ) |
Flush all fragments containing any code from the region [start
, start
+ size
). Control will not enter a fragment containing code from the region after this returns, but a thread already in such a fragment will finish out the fragment. This includes the current thread if this is called from a clean call that returns to the cache. This routine may only be called during a clean call from the cache, from a nudge event handler, or from a pre- or post-system call event handler. It may not be called from any other event callback. No locks can be held when calling this routine. Returns true if successful.
size
== 1 to flush fragments containing the instruction at address start
. A flush of size
== 0 is not allowed. | bool dr_unload_aux_library | ( | dr_auxlib_handle_t | lib | ) |
Unloads the given library, which must have been loaded by dr_load_aux_library(). Returns whether successful.
| bool dr_unmap_file | ( | void * | map, | |
| size_t | size | |||
| ) |
Unmaps a portion of a file mapping previously created by dr_map_file().
| bool dr_using_all_private_caches | ( | void | ) |
Returns true if all DynamoRIO caches are thread private.
| bool dr_using_app_state | ( | void * | drcontext | ) |
Returns whether the given thread indicated by drcontext
is currently using the application version of its system state.
| bool dr_using_console | ( | void | ) |
Returns true if the current standard error handle belongs to a console window (viz., cmd
). DR's dr_printf() and dr_fprintf() do not work with such console windows unless dr_enable_console_printing() is called ahead of time, and even then there are limitations detailed in dr_enable_console_printing(). This routine may result in loading a private copy of kernel32.dll.
| size_t dr_virtual_query | ( | const byte * | pc, | |
| MEMORY_BASIC_INFORMATION * | mbi, | |||
| size_t | mbi_size | |||
| ) |
Equivalent to the win32 API function VirtualQuery(). See that routine for a description of arguments and return values.
| int dr_vsnprintf | ( | char * | buf, | |
| size_t | max, | |||
| const char * | fmt, | |||
| va_list | ap | |||
| ) |
Identical to dr_snprintf() but exposes va_list.
| ssize_t dr_write_file | ( | file_t | f, | |
| const void * | buf, | |||
| size_t | count | |||
| ) |
Writes count
bytes from buf
to file f
. Returns the actual number written.


KIOKO and RISCAS celebrate launch of Birmingham Music Awards 2020
Birmingham Music Awards launches for 2020 to celebrate the best of the city's music talent
by Scott Dickinson, https://www.birminghammail.co.uk/authors/scott-dickinson/The staple event of Birmingham talent is returning to the city once more to uncover a new wave of musical performers.
Last year’s ceremony proved to be an overwhelming success, pulling in over three thousand applications for a show stopping celebration of a city brimming with undiscovered musicians.
Uniting performers and song writers with record Labels, producers, managers, radio/TV, legals, publishers and agents, the evening is set to be a valuable source of networking for all corners for music.
For applicants, the categories include Best Song, Best Male, Best Female, Best Band, Best Live Venue, Best Rap/Grime Act, Rising Star, Best Radio Station and Best DJ.
We caught up with the BMA founder, Jo Jeffries, to discuss the BMA’s and all things music in Brum.
Birmingham Music Awards 2020 launch on Wednesday 20th November. For more information click here
What can we expect at Birmingham Music Awards 2020?
Jo said “At our last ceremony, the incredible band KIOKO were spotted by UB40 and invited to join them on a huge tour. They’ll be performing at the press launch on Wednesday 20th November fresh from their trip.”
“The amazing quartet Riscas will also be performing for us as well.”
Jo remains determined to steer the spotlight from the capital city onto the wealth of talent in Birmingham.
“We need events like this in Birmingham because people are prone to either quitting or moving to London. There are no big labels or publishers over here.”
Trending Talent
Jo is a big fan of Birmingham's musical talent praises a host of bands including:
Flares - Birmingham based indie rock band quartet
North Parade - Indie Alt-pop 4-piece from Birmingham
MC T.Roadz - 13-year-old spitter from Birmingham
The Clause - Alternative indie group born in Birmingham
Mahalia - 21-year-old soul singer
Events in Birmingham’s music scene
The founder of BMA also recommends a host of events coming to the city over the coming months.
5th December, BIMM Birmingham’s end of term gig - she says is “always awesome platforms for new talent; we love working with the students at BIMM and seeing what they can do.”
18th December, BMA Music Network London - this is Christmas party at Mama Roux in which “The Brum music community comes together for one massive festive jolly, dressing for the part and networking.”
January 2020, Discover Birmingham 2020 - she says this initiative throughout January at the sunflower lounge will “exhibit the very best emerging talent from across the Midlands.”
Changes UK and other sponsors
Jo has also ensured to incorporate the work of ‘Changes UK’ into the event. Identifying themes of addiction and mental health issues in music, she’s determined to make a change.
Speaking of the charity she added “I came across it three years ago, the work they do is astounding. They work to recapture people’s identities and even rehouse them.”
There will also be a corporate presence at the show, with the likes of Tileyard Music and CD Baby set to return as well.
Birmingham Music Awards 2020 launch on Wednesday 20th November. For more information click here


@direktspeed/stream add-inputs Example index.mjs
This only allows numbers to be entered and else it will block the input
+
=
CustomElement example add-input-element
This only allows numbers to be entered and else it will block the input


December 05 2018
PC stuff:
Desktop updates:
- I started using the latest Ubuntu server version in the attempt to build a slim OS to use on any system
- I use I3 as my window manager
- but ince then I ecperienced some random crashes and freezes and the beautiful “Aw, Snap! Something went wrong…” in chromium, not sure why
Blog:
jekyll s --unpublished
orjekyll s -u
- just to run the jekyll server with unpublished posts included
Notebook:
- ocamlfuse fucks with me and I have to remount it after each reboot
boot via external SSD:
- I used an PCB of an external HDD( which I took apart to place the HDD in my Desktop) and put my old SSD in
- connected it to power and via USB(3.0)
- went into my BIOS(pressing F2 at startup) and enabled USB boot (boot mode: legacy)
- restart and into the bootmenu(pressing F12) choose the external disk(under USB)
- it booted right into the UEFI menu with options for Ubuntu and Windows
- since I tested this to use windows without having it on the main PC drives I started it
had to update the graphics drivers:
- uninstalled everything nvida related
- reboot
- got the lates drivers for my mx150 from nvidias website
- ran the installer
- reboot
- everything fine, card is recognised in the device and task manager(same with CPU, all disks and wifi card)
Raspberry plesure:
Pi Calendar:
- I checked out this video to learn about sprite collision detection in python to work on day4
- so I started using pygame as well
- it’s already working but I want to make it nice
Pi Zero:
- first setup ever
- I found a micro to mini USB which allowed me to connect my keyboard(otherwise I wouldn’t had been able to communicate with the Pi zero thanks to his inconvinient micro usb port placement)
- only thing to mention with the setup is that you have to press
space
to check a box in the setup
SSH:
on the Pi(host):
- open terminal
Ctrl + Alt + T
sudo systemctl enable ssh
sudo systemctl start ssh
on your PC(client):
ssh<EMAIL_ADDRESS>- because we haven’t changed the pi’s name there will be a warning like:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for raspberrypi.local has changed,
and the key for the corresponding IP address <IP_ADDRESS>
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:5FuzlLJo30I3uGNK1uRcieL4H776KeWzmz3aNyrzzDk.
Please contact your system administrator.
Add correct host key in /home/hisfantor/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hisfantor/.ssh/known_hosts:17
remove with:
ssh-keygen -f "/home/hisfantor/.ssh/known_hosts" -R "raspberrypi.local"
ECDSA host key for raspberrypi.local has changed and you have requested strict checking.
Host key verification failed.
- so just do what it tells you
ssh-keygen -f "/home/hisfantor/.ssh/known_hosts" -R "raspberrypi.local"
- then SSH again and type in the password which I have chosen while setting up the Pi