dwarf_getsrc_file cross-platform issue
by Mike Lindahl
Hello Roland and others,
I found an issue with dwarf_getsrc_file() and its ability to support a
combination of Windows and UNIX slashes ('\\' vs. '/'). The problem occurs
when I load an ELF file that was built on Windows and has relative paths to
source files (i.e. "dir\\file.c"). The logic in dwarf_getsrc_file()
currently handles this as a basename path (is_basename is true). In this
case, it will compare "dir\\file.c" with basename("dir/file.c"), which will
always fail. The fix for this is to check for the presence of either a '/'
or '\\' in the filename passed into the function.
Once this is fixed, there's still the issue of using a straight strcmp() to
compare the paths, which fails because the separator is different (I always
use '/' as my separator on Linux - I haven't found an easy way to determine
which separator to use for a given ELF file, but maybe someone has a
suggestion here and I could change my application code instead). But it
would be nice if libdw handled ELF files built on both Windows and Linux
seamlessly.
I propose the changes below to fix these issues (note that this diff is
against 0.142, but nothing has changed in this file since then). I'm
certain that this is not the most elegant way to solve the problem, so if
someone wants to improve on this and get it into the trunk, that would be
most excellent.
Please let me know if I can provide any additional information to help get
this fixed. Also, I will happily test out any fixes if that would be
helpful.
Thanks for your time!
--Mike
diff --git a/libdw/dwarf_getsrc_file.c b/libdw/dwarf_getsrc_file.c
index bc612f6..dcdda68 100644
--- a/libdw/dwarf_getsrc_file.c
+++ b/libdw/dwarf_getsrc_file.c
@@ -59,6 +59,23 @@
#include "libdwP.h"
+#include <stdio.h>
+
+int path_chr(char c)
+{
+ if(c == '\\')
+ return '/';
+ return c;
+}
+
+int path_strcmp (const char * p1, const char * p2)
+{
+ for(; path_chr(*p1) == path_chr(*p2); ++p1, ++p2)
+ if(*p1 == 0) {
+ return 0;
+ }
+ return *(unsigned char *)p1 < *(unsigned char *)p2 ? -1 : 1;
+}
int
dwarf_getsrc_file (Dwarf *dbg, const char *fname, int lineno, int column,
@@ -67,7 +84,8 @@ dwarf_getsrc_file (Dwarf *dbg, const char *fname, int
lineno, int column,
if (dbg == NULL)
return -1;
- bool is_basename = strchr (fname, '/') == NULL;
+ bool is_basename = (strchr (fname, '/') == NULL)
+ && (strchr(fname, '\\') == NULL);
size_t max_match = *nsrcs ?: ~0u;
size_t act_match = *nsrcs;
@@ -119,9 +137,9 @@ dwarf_getsrc_file (Dwarf *dbg, const char *fname, int
lineno, int column,
/* Match the name with the name the user provided. */
const char *fname2 = line->files->info[lastfile].name;
if (is_basename)
- lastmatch = strcmp (basename (fname2), fname) == 0;
+ lastmatch = path_strcmp (basename (fname2), fname) == 0;
else
- lastmatch = strcmp (fname2, fname) == 0;
+ lastmatch = path_strcmp (fname2, fname) == 0;
}
if (!lastmatch)
continue;
13 years, 9 months
Yeni Y ı
by Alto Turizm
Bu E-Posta'yı Düzgün Görüntüleyemiyorsanız Lütfen Tıklayınız
13 years, 9 months
I haven't been
by Niemela Danese
But I didn't mind. I missed stays, pretty as you please, and the
_Flibberty_ drifted down on him and fouled him, and we went ashore
together in as nice a mess as you ever want to see. Miss Lackland
transferred the recruits, and the trick was done." "But where was she
during the nor'wester?" Sheldon asked. "At Langa-Langa. Ran up there as
it was coming on, and laid there the whole week and traded for grub with
the niggers. When we got to Tulagi, there she was waiting for us and
scrapping with Burnett. I tell you, Mr. Sheldon, she's a wonder, that
girl, a perfect wonder." Munster refilled his glass, and while Sheldon
glanced across at Joan's house, anxious for her coming, Sparrowhawk took
up the tale. "Gritty! She's the grittiest thing, man or woman, that ever
blew into the Solomons. You should have seen Poonga-Poonga the morning
we arrived--Sniders popping on the beach and in the mangroves, war-drums
booming in the bush, and signal-smokes raising everywhere. 'It's all
up,' says Captain Munster." "Yes, that's what I said," declared that
mariner. "Of course it was all up. You could see it with half an eye and
hear it with one ear." "'Up your granny,' she says to him," Sparrowhawk
went on. "'Why, we haven't arrived yet, much less got started. Wait till
the anchor's down before you get afraid.'" "That's what she said to me,"
Munster proclai
13 years, 9 months
There and before he had learned to appreciate the mental capacities of bears. S
by Fahrenkrug
Ed out alone the next day to get more Grizzly meat. He didn't come back,
and the boys who went out to look for him found his body, covered up
with leaves and dirt, in the edge of a clump of brush. His skull had
been smashed by a blow from a Grizzly's paw." CHAPTER VII. THE
ADVENTURES OF PIKE. Pike was one of the oldest of Yosemite guides and
altogether the quaintest of the many queer old fellows who drifted into
the valley in early days and there were stranded for life. He had
another name, n
13 years, 9 months
The singular formation constituting the berg and attendan
by Vangemert
Inish the flier who went down with it to the ground." "Not if we can
prevent it, I say. Take a nosedive, Tom, and leave it to me to manage
the gun!" "He isn't alone, Jack, for I saw a second skulker in the
brush, I'm sure." "We've got to drive those jackals away, no matter at
what risk. Go to it, Tom, old scout!" The big battle-plane, soaring
fully two thousand feet abo
13 years, 9 months
eBuppies.com - Offers New Online Dating Site for Black Urban Professionals
by ebuppies admin
<http://www.ebuppies.com/tellafriend.php>
December 18, 2009
<http://www.ebuppies.com/signup.php>
Dear Friend, <http://www.ebuppies.com>
eBuppies.com (www.ebuppies.com <http://www.ebuppies.com/signup.php>
) is a new online dating site that is dedicated to providing singles
from all over with the opportunity to connect with other buppy singles
in their local area or anywhere of their choice.
More and more buppy singles are going online to connect with others
because going out week after week to nightclubs and bars can be
tiresome, as well as expensive. eBuppies.com makes dating easy by
hosting hundreds of profiles of different singles looking for love.
Buppies can join on a monthly basis for less than they would probably
pay for one night at a nightclub or bar.
Buppies who are looking for love, romance or just friendship now have
a unique resource that can help them discover their future soul mate:
eBuppies.com.
Although high technology drives eBuppies.com, the online dating site
is simple and easy for buppies to navigate. Buppies can register,
browse, search and contact other singles
<http://www.ebuppies.com/signup.php>
at no charge. There is also no charge for buppies to upload a photo
with their profile. A control panel enables buppies to customize
preferences based on their individual requirements. The control panel
also blocks undesired contacts for buppies' convenience.
The pricing for membership is quite cost effective especially for the
average buppy. By January 31 2010 visitors can sign up for 1 Month and
get 30 Days extra membership exclusively through our THIRTYPLUS
<http://www.ebuppies.com/signup.php>
promo code.
For more information, visit www.ebuppies.com.
<http://www.ebuppies.com/signup.php>
About eBuppies.com:
eBuppies.com is a new online dating service based in San Francisco.
Its goal is to provide easy and affordable online dating to Black
Urban Professionals by using state of the art chat systems, instant
messaging, and forum technology to satisfy today's evolving online
community demands.
Terms of use <http://www.ebuppies.com/index.php?page=terms_of_use>
Contact Info:
Name: Mr. F. Jackson
Address: 1230 Market Street, #252
City: San Francisco
State: California
Country: United States
Zip: 94102
Web Address: www.ebuppies.com <http://www.ebuppies.com/signup.php>
Phone: 510-575-4124
/
/
/ / <http://www.ebuppies.com/signup.php>
Site Statistics
Special Offer!
Members in Last Week:
1
Total Male eBuppies:
10
Total Female eBuppies:
15
Pictures in Last Week:
0
Members online:
0
News
Women More Likely to Snoop Than Men
Nov 24, 2009
In the new film, Little Black Book, Brittany Murphy's character
engages in some high-tech snooping on her new boyfriend. Based...
more <http://www.ebuppies.com/signup.php>
Internet Dating More Successful than Thought
Nov 24, 2009
Internet dating is proving a much more successful way to find
long-term romance and friendship for thousands of people than...
more <http://www.ebuppies.com/signup.php>
All News <http://www.ebuppies.com/signup.php>
Poll
<http://www.ebuppies.com/signup.php>
Success Stories
A Sister's Story
Sep 11, 2009
by Monique <javascript:popUpScrollWindow2(>
What initially started out as something to relieve a little boredom
and to have some fun turned into one of...
more <http://www.ebuppies.com/signup.php>
All Stories <http://www.ebuppies.com/signup.php>
<http://www.ebuppies.com/signup.php>
Welcome to eBuppies.com
See why eBuppies.com is the fastest growing Black Urban Professional
relationship site on the web. Create your eBuppies.com profile to
begin the exciting journey towards finding your match.
Members online: 0 <http://www.ebuppies.com/onlineusers.php>
Don't stay alone, Join Now for Free
<http://www.ebuppies.com/signup.php>
Newest eBuppies
kldixson <http://www.ebuppies.com/signup.php>
systemsthinking
<http://www.ebuppies.com/signup.php>
Show full list <http://www.ebuppies.com/signup.php>
Newest Profiles
brotherX <http://www.ebuppies.com/signup.php>
*Age:*
40
*Gender:*
Man
*Looking for:*
Woman
*Location:*
Albany,
California,
United States
<javascript:popUpScrollWindow2(>
No Pictures
*Active wihin 1 week*
View Profile <http://www.ebuppies.com/signup.php>
kldixon <http://www.ebuppies.com/signup.php>
*Age:*
40
*Gender:*
Man
*Looking for:*
Woman
*Location:*
Oakland,
California,
United States
<javascript:popUpScrollWindow2(>
No Pictures
*Active wihin 1 week*
View Profile <http://www.ebuppies.com/signup.php>
Login <http://www.ebuppies.com/signup.php>
| Privacy <http://www.ebuppies.com/signup.php>
| Terms of Use <http://www.ebuppies.com/signup.php>
| Services <http://www.ebuppies.com/signup.php>
| FAQ's <http://www.ebuppies.com/signup.php>
| Articles <http://www.ebuppies.com/signup.php>
| Affiliate <http://www.ebuppies.com/signup.php>
| Invite a Friend <http://www.ebuppies.com/signup.php>
| Feedback <http://www.ebuppies.com/signup.php>
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tbody>
<tr>
<td colspan=3 align=right ><font face="arial,verdana"
size="2">If you do not want to receive any more newsletters,
http://ebuppies.com/emailserv/?p=unsubscribe&uid=70f0fa098bdc819cdba8cb8c...
To update your preferences and to unsubscribe visit
http://ebuppies.com/emailserv/?p=preferences&uid=70f0fa098bdc819cdba8cb8c...
Forward a Message to Someone
http://ebuppies.com/emailserv/?p=forward&uid=70f0fa098bdc819cdba8cb8cf11f...</font></td>
</tr>
<tr>
<td><font face="arial,verdana" size="1">CUBEMEDIALAB<br><br />
1230 Market Street<br>
Suite 252<br>
San Francisco, California 94102<br>
USA<br />
</font></td><br />
<td align="right"><a href="http://www.cubemedialab.com"
target="_blank"><img border="0"
src="http://www.ebuppies.com/images/cube_logo.gif" alt="Try digital design
with cubemedialab.com!" /></a></td><br />
</tr>
</tbody>
</table>
--
Powered by PHPlist, www.phplist.com --
13 years, 9 months
MUDAH-MUDAHAN BERMANFAAT...
by Rina.Indria
Dear Rekan2,
Mohon maaf kalau sudah pernah mendapat informasi serupa
sebelumnya.
Kenalkan saya Rina, mahasiswi salah satu universitas
swasta di Bandung.
Rina pengen berbagi informasi nih buat kita semua,
mudah2an bermanfaat.
Barangkali ada dari rekan2 yg sedang butuh dana/income
dalam jumlah besar..
Rekan2 bisa baca cara mendapatkannya disini (silakan klik
atau copy-paste link berikut ke browser anda):
http://www.program5milyar.com/?id=sukses123
Iseng2 rina udah coba, dan hasilnya udah lumayan banget
utk ukuran rina (lihat rincian income rina dibawah dan
SCAN BUKU TABUNGAN rina terlampir). Jangan lupa lihat juga
scan/print buku tabungan member lain di link website
diatas (di menu Kesaksian).
Program ini dijalankan secara online (maya), tapi uang yg
dihasilkan betul2 riil. Ada transaksi, ada produk, logis,
masuk akal, dan tidak ada satu pihak pun yg dirugikan
dalam program ini.. Program ini dijalankan secara LEGAL &
HALAL (penjelasan detail harap baca di websitenya, di menu
Legal & Halal)
Websitenya ( http://www.program5milyar.com/?id=sukses123 )
menjelaskan secara lengkap semua hal tentang program ini
sampai sejelas2nya. Mungkin dipahami dulu aja sistem/cara
kerja program ini secara keseluruhan di websitenya.
Sistemnya tidak rumit, mudah sekali dipahami. Rina yakin,
semua uneg2 / pertanyaan2 dari rekan2 pasti akan terjawab
jika membaca semua materi yg ada pada setiap menu di
website tsb. Pastikan rekan2 tidak mengambil
kesimpulan/berkomentar apa2 dulu sebelum betul2 membaca
semua materi yg ada pada setiap menu di website, karena
program5milyar ini unik, berbeda dg bisnis manapun yg
pernah ada.
Rina dulu juga gabung atas ajakan teman yg udah duluan
mendaftar. Tadinya sih rina gak mau berpikir muluk2, asal
bisa balik modal aja udah cukup, lagian kita kan dapat
produk yg nilainya bahkan lebih besar dari yg kita
bayarkan. So, nothing to loose.
Tapi ternyata apa yg rina peroleh sungguh di luar
perkiraan rina. Setelah 8 bulan gabung udah lumayan banget
dapatnya.
Rincian income Rina setelah 8 bulan gabung adalah sbb:
(catatan: semua komisi dibawah ditransfer langsung oleh
member baru ke rekening kita)
Rina dapat member langsung sebanyak 17 orang (disebut
member level-1)
=> komisi yg ditransfer ke rekening Rina = 17 x Rp
50.000 = Rp 850.000
Masing2 member level-1 diatas mendapatkan pula member
rata-rata sebanyak 8 orang (disebut member level-2, jumlah
= 8 x 17 = 136 orang)
=> komisi yg ditransfer ke rekening Rina = 136 x Rp
10.000 = Rp 1.360.000
Masing2 member level-2 rata2 mendapatkan member 6 orang
(disebut member level-3, jumlah = 6 x 136 = 816 orang)
=> komisi yg ditransfer ke rekening Rina = 816 x Rp
10.000 = Rp 8.160.000
Masing2 member level-3 rata2 mendapatkan member 4 orang
(disebut member level-4, jumlah = 4 x 816 = 3264 orang)
=> komisi yg ditransfer ke rekening Rina = 3264 x Rp
10.000 = Rp 32.640.000
Masing2 member level-4 rata2 mendapatkan member 3 orang
(disebut member level-5, jumlah = 3 x 3264 = 9792 orang)
=> komisi yg ditransfer ke rekening Rina = 9792 x Rp
50.000 = Rp 489.600.000
Jadi, total komisi yg ditransfer ke rekening Rina (setelah
8 bulan gabung):
= 850.000 + 1.360.000 + 8.160.000 + 32.640.000 +
489.600.000
= Rp 532.610.000,-
Bagaimana dana tsb bertubi2 masuk ke rekening kita? Lihat
SCAN BUKU TABUNGAN Rina terlampir.
Lumayan banget utk ukuran rina. Uang segitu mungkin udah
cukup utk beli rumah and mobil.
Rina yakin kita semua bisa kok mendapatkan income seperti
yg Rina dapatkan di atas. Kuncinya sih asal kita rajin aja
nyebarin link website replika kita ke teman2 kita, rekan
kerja, sodara, ke siapa saja, baik lewat email, milis2,
situs2 iklan, dll, kemudian TUNJUKKAN BUKTI SCAN BUKU
TABUNGAN para member yg telah sukses di program ini, atau
scan buku tabungan anda jika anda sudah mendapatkan income
yg lumayan di program ini, biasanya tidak terlalu sulit
meyakinkan teman2 kita utk bergabung (scan buku tabungan
para member bisa diambil/didownload di menu Kesaksian di
website diatas, atau bisa juga gunakan scan buku tabungan
rina terlampir. Jika anda sudah mendapatkan income lumayan
di program ini, anda juga bisa tunjukkan scan buku
tabungan anda ke teman2).
Website replika adalah website atas nama kita sendiri yg
kita dapatkan secara otomatis setelah keanggotaan kita
diaktifkan. Website replika rina adalah:
http://www.program5milyar.com/?id=sukses123
Setiap transaksi yg terjadi lewat website replika kita,
otomatis masuk rekening kita.
Tidak perlu kuatir pengembangan Program Program 5MILYAR
ini akan jenuh, karena pertumbuhan pengguna internet di
Indonesia yg mencapai 6 juta orang lebih per tahun jauh
lebih besar dibanding pertumbuhan peserta program ini.
Jadi program ini abadi, tidak akan ada istilah member
terakhir dalam program ini, karena akan selalu ada 6 juta
orang lebih pengguna baru internet tiap tahunnya yg
potensial utk jadi member.
RINA PUNYA TRIK2 / TIPS2 JITU agar bisa merekrut banyak
member berdasarkan pengalaman rina sendiri, gak banyak
orang yg tahu. Rina bisa share jika rekan2 bergabung lewat
account rina:
http://www.program5milyar.com/?id=sukses123
Segera gabung ya..
Sistemnya rina rasa sangat sederhana dan mudah dipahami,
informasi lengkap disini (silakan klik atau copy-paste
link berikut ke browser anda):
http://www.program5milyar.com/?id=sukses123
(website replika Rina, sukses123 adalah username Rina)
Mohon disebarkan juga informasi ini ke teman2 kita yg lain
yg sedang membutuhkan dana dlm jumlah yg besar.
Salam,
Rina
Rina Profile: http://www.friendster.com/rinaku
Join jadi member Friendster dulu, bisa lihat album foto
Rina
UANG BUKAN SEGALANYA, TAPI SEGALANYA PERLU UANG
NB:
Jika anda tidak punya akses internet di kantor/kampus,
silakan copy/tulis link berikut:
http://www.program5milyar.com/?id=sukses123
kemudian dibuka di rumah/warnet ya..
Untuk gambaran awal, silakan lihat overview program ini
terlampir.
*************************************************************************
KESAKSIAN MEMBER LAIN, PAK BAMBANG WIDJATMOKO DARI
SURABAYA:
Bisa Menguliahkan Anak dan Biaya Berobat Ibu yg Sakit
Dear webmaster program 5 milyar,
Saya ingin berterima kasih sekali kepada anda karena
dengan adanya program ini saya betul2 terbantu dalam
pemenuhan berbagai kebutuhan dana keluarga saya. Biaya ibu
berobat ke rumah sakit, biaya kuliah anak2, dan insya
Allah untuk biaya beli rumah yg lebih layak bulan depan
(mudah2an).
Awalnya saya kenal program ini, saya mendapat email dari
seorang teman (beda kantor). Ada program bisnis bagus nih,
katanya. Sistemnya sederhana, gampang dipahami, dan kalo
sabar bisa mendapatkan penghasilan lebih dari 5 milyar,
tambahnya lagi. Mendengar kata-kata 5 milyar, saya
berpikir skeptis, mana mungkin, batin saya, akhirnya saya
delete saja email tsb. Sekitar 4 bulan setelah itu, saya
mendapatkan email yg sama dari rekan yg berbeda. Dengan
semangat menggebu2 di emailnya dia bercerita kalo dalam
waktu sebulan dia bergabung, saldo di rekening BNI-nya
bertambah lebih dari Rp 100 juta. Saya berpikir, gak
mungkin dua orang sahabat baik saya berbohong tentang hal
yg sama terhadap saya. Lagi pula gak ada ruginya
bergabung, toh cuma 180 ribu saja, itu pun sudah dapat
produk berupa program bisnis. Akhirnya, iseng2 saya
gabung, tanpa harapan yg berlebihan. Kemudian saya
informasikan program ini lewat email, sms, mulut ke mulut,
dll ke sekitar 80 orang. Sebagian dari mereka ada yg saya
kenal dan ada juga yg tidak, setelah itu saya lupakan.
Sekitar 3 bulan setelah itu, waktu saya menyetor uang ke
bank (jumlahnya sekitar 500 ribu waktu itu), waktu buku
tabungan saya di-print saya menunggu lama sekali,
teller-nya bilang buku tabungan saya sudah tidak muat lagi
dan harus diganti dengan yg baru. Saya kaget, ada apa?
Rasanya dalam 3 bulan terakhir saya tidak melakukan
transaksi apa2. Begitu saya cek, di kolom kredit isinya 50
ribu dan 10 ribu banyak sekali dan di kolom saldo tercetak
angka 160 juta lebih dan jika ditambah dengan buku ke 2
totalnya ada 250 juta sekian. Sontak saya kaget, ini duit
begitu banyak dari mana? Setelah berpikir keras dan
melihat angka 50 ribu dan 10 ribu baru saya teringat
program 5 milyar yg saya pernah gabung dulu karena waktu
gabung saya juga mentransfer 50 ribu dan 10 ribu ke
beberapa orang.
Aduh maaak, terima kasih Tuhan, terima kasih webmaster.
Saya bisa kuliahkan anak dan membantu biaya berobat ibu
saya yg sakit dengan dana ini. Setelah itu saya betul2
percaya bahwa program bisnis ini bener2 bekerja. Sejak itu
saya mulai aktif mempromosikan program ini ke siapa saja,
lewat email, milis, sms, dll. Sekarang hasilnya sudah
lebih dari 500 juta masuk ke rekening bank saya. Sekali
lagi terima kasih webmaster program 5 milyar.
------------------------------------------------------------------------------------------------------------
Untuk melengkapi hidup Anda, kini telah hadirProtector Postpaid untuk Pelanggan Speedy hanya dengan Rp 8000/bulan,
layanan keamanan online yang dapat digunakan langsung saat menjelajahi internet, melindungi Anda dari Virus kapan saja
dan di mana saja.
Info lebih lanjut hubung 147 atau http://protector.telkomspeedy.com
------------------------------------------------------------------------------------------------------------
Sekarang Gratis Nelpon SLJJ Flexi diperluas ke Yogja
------------------------------------------------------------------------------------------------------------
Raih Paket Umroh, Notebook, XBOX, Ipod Touch dan banyak hadiah lain di http://netkuis.telkom.net
Netkuis Ramadhan 1430H persembahan Telkom
------------------------------------------------------------------------------------------------------------
13 years, 9 months
2009-09-29 Status
by Petr Machata
Last week + today
-----------------
Time spent on elfutils: ~50%
writer:
* Emit .debug_ranges
* Emit .debug_loc
* dwarfcmp ./a.out ./a.out.out now works
It's on pmachata/dwarf-writer.
Next in plan
------------
* Merge in dwarf branch.
* Make dwarfcmp work for bigger files.
* We can't optimize certain references right away. For these we now
pick the biggest form available. We could shrink these fields
afterwards. But the codebase is not ready for this, e.g. gaps have to
be able to move, size of ElfData has to be patched, etc. So work on
preparing these bits, they will be useful later.
PM
13 years, 9 months