Bug 458044 - Improve TLS support to allow third party implementation.
Summary: Improve TLS support to allow third party implementation.
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: 1.3   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: 1.3   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 09:27 EST by Benoit Perrin CLA
Modified: 2015-06-16 03:18 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Perrin CLA 2015-01-21 09:27:08 EST
The actual implementation of TLS is meant to be use for linux host. The proposed patched updates the code to allow third party to implement TLS support for their OSes.
Comment 1 Benoit Perrin CLA 2015-01-21 09:38:40 EST
The patch is posted:

https://git.eclipse.org/r/40032
Comment 2 Eugene Tarassov CLA 2015-01-21 15:05:01 EST
(In reply to Benoit Perrin from comment #1)
> The patch is posted:
> 
> https://git.eclipse.org/r/40032

I need transform_cmd to be explained.

Why do you need to move the transformation outside of dwarf_transform_expression()?

Why do you call transform_cmd in add_dwarf_location_command(), but do not call it in dwarf_evaluate_expression()?

Why do you want to transform whole expression instead of transforming only OP_form_tls_address?

Also, your comment says "TLS address is returned by the agent". What does it mean exactly? While some DWARF expression are sent to agent to improve performance, symbols server sill needs to be able to evaluate any expression. If you going to move TLS computation to the agent, you will need a way for the server to request the address from the agent.
Comment 3 Benoit Perrin CLA 2015-01-22 06:26:59 EST
(In reply to Eugene Tarassov from comment #2)
> (In reply to Benoit Perrin from comment #1)
> > The patch is posted:
> > 
> > https://git.eclipse.org/r/40032
> 
> I need transform_cmd to be explained.
> 
> Why do you need to move the transformation outside of
> dwarf_transform_expression()?
> 

In my particular case, I needed the PropertyValue object in my transform_cmd function.

> Why do you call transform_cmd in add_dwarf_location_command(), but do not
> call it in dwarf_evaluate_expression()?
> 

Yes it makes sense to have such a call for both cases. I only focused on the first one.

> Why do you want to transform whole expression instead of transforming only
> OP_form_tls_address?
> 

I can't transform only OP_form_tls_address, as it would be too complex in my case. I need to evaluate the all dwarf location expression to get the value to transform OP_form_tls_address.

> Also, your comment says "TLS address is returned by the agent". What does it
> mean exactly? While some DWARF expression are sent to agent to improve
> performance, symbols server sill needs to be able to evaluate any
> expression. If you going to move TLS computation to the agent, you will need
> a way for the server to request the address from the agent.

The server relies on an agent service to get the TLS address, based on the dwarf expression value and runcontrol context.

Giving a second thought (a fourth thought in fact!), I may come up wit another solution that does not imply transform_cmd. I will make try and let you know.
Comment 4 Benoit Perrin CLA 2015-01-22 10:13:08 EST
I posted a new simpler patch as:

https://git.eclipse.org/r/40148
Comment 5 Eugene Tarassov CLA 2015-02-24 17:03:19 EST
Committed through Gerrit.
Fixed.
Thanks!