{"action":"created","issue":{"url":"https://api.github.com/repos/radare/radare2/issues/9379","repository_url":"https://api.github.com/repos/radare/radare2","labels_url":"https://api.github.com/repos/radare/radare2/issues/9379/labels{/name}","comments_url":"https://api.github.com/repos/radare/radare2/issues/9379/comments","events_url":"https://api.github.com/repos/radare/radare2/issues/9379/events","html_url":"https://github.com/radare/radare2/issues/9379","id":296298563,"number":9379,"title":"Implement ESIL for SH architecture. Troubles with convert memory to .data (+Suggestion)","user":{"login":"jasuramme","id":12981794,"avatar_url":"https://avatars0.githubusercontent.com/u/12981794?v=4","gravatar_id":"","url":"https://api.github.com/users/jasuramme","html_url":"https://github.com/jasuramme","followers_url":"https://api.github.com/users/jasuramme/followers","following_url":"https://api.github.com/users/jasuramme/following{/other_user}","gists_url":"https://api.github.com/users/jasuramme/gists{/gist_id}","starred_url":"https://api.github.com/users/jasuramme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasuramme/subscriptions","organizations_url":"https://api.github.com/users/jasuramme/orgs","repos_url":"https://api.github.com/users/jasuramme/repos","events_url":"https://api.github.com/users/jasuramme/events{/privacy}","received_events_url":"https://api.github.com/users/jasuramme/received_events","type":"User","site_admin":false},"labels":[{"id":110937869,"url":"https://api.github.com/repos/radare/radare2/labels/anal","name":"anal","color":"009800","default":false},{"id":187975979,"url":"https://api.github.com/repos/radare/radare2/labels/esil","name":"esil","color":"bfe5bf","default":false},{"id":8289064,"url":"https://api.github.com/repos/radare/radare2/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-12T08:41:23Z","updated_at":"2018-02-12T22:49:38Z","closed_at":null,"author_association":"NONE","body":"I'm changing anal_sh.c and that what I want to achieve: There is data can be stored in program memory. And I want if some memory was read, r2 would convert type of that memory cells into .data (it is asm instruction in very beginning), just as Cd command do. First I thought, it can be done by defining op->dst and op->src values in sh_op function, but it doesn't help (or it has to, and I just doing that wrong?). \r\n\r\nI tried to use r_meta_add(); function, and if I call it from sh_op function, cells converts to .data even before any \"aa\" commands, which is wrong, as it will give wrong result. I passed through code, (THERE IS SUGGESTION) and me personaly would call r_meta_add();  from r_anal_esil_mem_read(). It's easy to do, but probably there are some reasons not to do that. \r\n\r\nI want to implement ESIL to sh architecture and share with others, so I don't wont to start in wrong or any stupid way. Can you please advice direction, how my problem shoulde be solved? Or people to talk with"},"comment":{"url":"https://api.github.com/repos/radare/radare2/issues/comments/365090175","html_url":"https://github.com/radare/radare2/issues/9379#issuecomment-365090175","issue_url":"https://api.github.com/repos/radare/radare2/issues/9379","id":365090175,"user":{"login":"radare","id":917142,"avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T22:49:38Z","updated_at":"2018-02-12T22:49:38Z","author_association":"OWNER","body":"the analop->src/dst should be deprecated and removed at some point, only gb, mips and x86 uses it, and its not really consistent or complete at all. and the same info can be taken from other methods... the main problem ¡ of it is that it makes the analysis so slow.\r\n\r\ni dont see why you need to use that src/dst things to specify taht a specific address is data or code. because the analysis will work exactly the same, having data or code is just a visual thingfor the user.\r\n\r\ni dont think we should add meta from esil. this auto-data thing is not done for any other app, and the approach of other tools is to assume everything is data unless its executed.\r\n\r\nOne of the things that might be solving this is to use the anal cmd queue which is used by a2f, but this shuold be out of esil, because thats not a task for esil. and this can be done by just adding an esil hook for memory accesses. but ... how do you know that a memory access is accessing data and not code. this can result in lot of false positives and make the code unreadable if there's a function that hashes the code section for example"}}
{"actor":{"display_login":"radare"}}